gcc/testsuite/gfortran.dg/save_7.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! { dg-options "-O2 -fno-automatic" } |
| 3 | ! |
| 4 | ! PR fortran/95107 - do not make associate variables TREE_STATIC |
| 5 | ! Contributed by G.Steinmetz |
| 6 | |
| 7 | program p |
| 8 | type t |
| 9 | real, pointer :: a => null() |
| 10 | end type |
| 11 | type t2 |
| 12 | type(t) :: b(1) |
| 13 | end type |
| 14 | type(t2), save :: x |
| 15 | associate (y => x%b) |
| 16 | end associate |
| 17 | end |