2 ! { dg-options "-finit-real=NAN" }
3 ! { dg-add-options ieee }
7 ! Contributed by Fred Krogh
9 ! The NaN initialization used to set the associate name to NaN!
13 type, public
:: test_ty
18 subroutine test(e
, var1
)
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
39 real :: var1
! Should get NaN initialized