blob: 42baf4d2e0c0c8a3b4f2e307ab7b6c2656fd9dd7 [file] [log] [blame]
! { dg-do run }
! { dg-options "-fno-automatic" }
!
! PR fortran/37835
! Contributed by Tobias Burnus <burnus@gcc.gnu.org>.
!
subroutine foo(n)
integer :: n
type t
integer :: i = 42
end type t
type(t) :: myt
if(n==1) myt%i = 2
print *, myt%i
if (n > 1 .and. myt%i /= 2) stop 1
end subroutine foo
call foo(1)
call foo(2)
end