Debian Codegraph @

gcc/testsuite/gfortran.dg/no-automatic.f90

raw
1 ! { dg-do run }
2 ! { dg-options "-fno-automatic" }
3 !
4 ! PR fortran/37835
5 ! Contributed by Tobias Burnus <[email protected]>.
6 !
7 subroutine foo(n)
8 integer :: n
9 type t
10 integer :: i = 42
11 end type t
12 type(t) :: myt
13 if(n==1) myt%i = 2
14 print *, myt%i
15 if (n > 1 .and. myt%i /= 2) stop 1
16 end subroutine foo
17
18 call foo(1)
19 call foo(2)
20 end