summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/save_7.f90
blob: dfbef12bec05330ca817064b66016e5a7eba26f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
! { dg-do compile }
! { dg-options "-O2 -fno-automatic" }
!
! PR fortran/95107 - do not make associate variables TREE_STATIC
! Contributed by G.Steinmetz

program p
  type t
     real, pointer :: a => null()
  end type
  type t2
     type(t) :: b(1)
  end type
  type(t2), save :: x
  associate (y => x%b)
  end associate
end