1 ! Check that we correctly simplify ISNAN
5 ! { dg-options "-fno-range-check" }
6 ! { dg-add-options ieee }
7 ! { dg-skip-if "NaN not supported" { spu-*-* } }
10 real, parameter :: inf
= 2 * huge(inf
)
11 real, parameter :: nan1
= 0. / 0.
12 real, parameter :: nan2
= 1.5 * nan1
13 real, parameter :: nan3
= inf
/ inf
14 real, parameter :: nan4
= inf
- inf
15 real, parameter :: nan5
= 0. * inf
16 real, parameter :: normal
= 42.
18 integer(kind
=merge(4, 0, isnan(nan1
))) :: a
19 integer(kind
=merge(4, 0, isnan(nan2
))) :: b
20 integer(kind
=merge(4, 0, isnan(nan3
))) :: c
21 integer(kind
=merge(4, 0, isnan(nan4
))) :: d
22 integer(kind
=merge(4, 0, isnan(nan5
))) :: e
24 integer(kind
=merge(0, 4, isnan(inf
))) :: f
25 integer(kind
=merge(0, 4, isnan(-inf
))) :: g
26 integer(kind
=merge(0, 4, isnan(normal
))) :: h