view gcc/testsuite/gfortran.dg/isnan_2.f90 @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
line wrap: on
line source

! Test for the ISNAN intrinsic on constants
!
! { dg-do run }
! { dg-options "-fno-range-check" }
! { dg-add-options ieee }
!
  implicit none
  character(len=1) :: s
  write(s,'(L1)') isnan(0.)
  if (s /= 'F') STOP 1

  write(s,'(L1)') isnan(exp(huge(0.)))
  if (s /= 'F') STOP 2

  write(s,'(L1)') isnan(0./0.)
  if (s /= 'T') STOP 3
end