summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/nan_7.f90
blob: 12c7b3ce40f59110fdf820c5f060c0889374480a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
! { dg-do run }
! { dg-options "-fno-range-check" }
! { dg-require-effective-target fortran_real_16 }
! { dg-require-effective-target fortran_integer_16 }
! PR47293 NAN not correctly read
character(len=200) :: str
real(16) :: r
integer(16) :: k2
integer(16), parameter :: quietnan = 170099645085600953110659059745250344960
r = 1.0
str = 'NAN' ; read(str,*) r
k2 = transfer(r,k2)
k2 = iand(k2, z'fff80000000000000000000000000000')
if (k2.ne.quietnan) call abort
end