OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [module_nan.f90] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! { dg-options "-fno-range-check" }
3
! { dg-add-options ieee }
4
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
5
!
6
! PR fortran/34318
7
!
8
! Infinity and NaN were not properly written to the .mod file.
9
!
10
module nonordinal
11
  implicit none
12
  real, parameter :: inf = 1./0., nan = 0./0., minf = -1./0.0
13
end module nonordinal
14
 
15
program a
16
  use nonordinal
17
  implicit none
18
  character(len=20) :: str
19
  if (log(abs(inf))  < huge(inf)) call abort()
20
  if (log(abs(minf)) < huge(inf)) call abort()
21
  if (.not. isnan(nan)) call abort()
22
  write(str,"(sp,f10.2)") inf
23
  if (adjustl(str) /= "+Infinity") call abort()
24
  write(str,*) minf
25
  if (adjustl(str) /= "-Infinity") call abort()
26
  write(str,*) nan
27
  if (adjustl(str) /= "NaN") call abort()
28
end program a
29
 
30
! { dg-final { cleanup-modules "nonordinal" } }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.