1! { dg-do run } 2! { dg-options "-fno-automatic" } 3! 4! PR fortran/37835 5! Contributed by Tobias Burnus <burnus@gcc.gnu.org>. 6! 7subroutine 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 16end subroutine foo 17 18call foo(1) 19call foo(2) 20end 21