[AArch64] Merge stores of D-register values with different modes
[official-gcc.git] / gcc / testsuite / gfortran.dg / nan_3.f90
blob97b6fef179c937f0113b0c3a49ae026bd77c0971
1 ! { dg-do run }
2 ! { dg-options "-fno-range-check" }
3 ! { dg-add-options ieee }
4 ! { dg-skip-if "NaN not supported" { spu-*-* } }
6 ! PR fortran/34319
8 ! Check support of INF/NaN for I/O.
10 program main
11 implicit none
12 real :: r
13 complex :: z
14 character(len=30) :: str
16 str = "nan"
17 read(str,*) r
18 if (.not.isnan(r)) STOP 1
19 str = "(nan,4.0)"
20 read(str,*) z
21 if (.not.isnan(real(z)) .or. aimag(z) /= 4.0) STOP 2
22 str = "(7.0,nan)"
23 read(str,*) z
24 if (.not.isnan(aimag(z)) .or. real(z) /= 7.0) STOP 3
26 str = "inFinity"
27 read(str,*) r
28 if (r <= huge(r)) STOP 4
29 str = "(+inFinity,4.0)"
30 read(str,*) z
31 if ((real(z) <= huge(r)) .or. aimag(z) /= 4.0) STOP 5
32 str = "(7.0,-inFinity)"
33 read(str,*) z
34 if ((aimag(z) >= -huge(r)) .or. real(z) /= 7.0) STOP 6
36 str = "inf"
37 read(str,*) r
38 if (r <= huge(r)) STOP 7
39 str = "(+inf,4.0)"
40 read(str,*) z
41 if ((real(z) <= huge(r)) .or. aimag(z) /= 4.0) STOP 8
42 str = "(7.0,-inf)"
43 read(str,*) z
44 if ((aimag(z) >= -huge(r)) .or. real(z) /= 7.0) STOP 9
46 end program main