arm: Add .type and .size to __gnu_cmse_nonsecure_call [PR115360]
[official-gcc.git] / gcc / testsuite / gfortran.dg / init_flag_10.f90
blob49b75f9603a14e87ef38c4372164237b070fe7ea
1 ! { dg-do run }
2 ! { dg-options "-finit-real=NAN" }
3 ! { dg-add-options ieee }
5 ! PR fortran/50619
7 ! Contributed by Fred Krogh
9 ! The NaN initialization used to set the associate name to NaN!
12 module testa2
13 type, public :: test_ty
14 real :: rmult = 1.0e0
15 end type test_ty
17 contains
18 subroutine test(e, var1)
19 type(test_ty) :: e
20 real :: var1, var2 ! Should get NaN initialized
22 ! Should be the default value
23 if (e%rmult /= 1.0) STOP 1
25 ! Check that NaN initialization is really turned on
26 if (var1 == var1) STOP 2
27 if (var2 == var2) STOP 3
29 ! The following was failing:
30 associate (rmult=>e%rmult)
31 if (e%rmult /= 1.0) STOP 4
32 end associate
33 end subroutine test
34 end module testa2
36 program testa1
37 use testa2
38 type(test_ty) :: e
39 real :: var1 ! Should get NaN initialized
40 call test(e, var1)
41 stop
42 end program testa1