2 ! { dg-options "-finit-real=NAN" }
3 ! { dg-add-options ieee }
4 ! { dg-skip-if "NaN not supported" { spu-*-* } }
8 ! Contributed by Fred Krogh
10 ! The NaN initialization used to set the associate name to NaN!
14 type, public
:: test_ty
19 subroutine test(e
, var1
)
21 real :: var1
, var2
! Should get NaN initialized
23 ! Should be the default value
24 if (e
%rmult
/= 1.0) STOP 1
26 ! Check that NaN initialization is really turned on
27 if (var1
== var1
) STOP 2
28 if (var2
== var2
) STOP 3
30 ! The following was failing:
31 associate (rmult
=>e
%rmult
)
32 if (e
%rmult
/= 1.0) STOP 4
40 real :: var1
! Should get NaN initialized