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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [nan_3.f90] - Blame information for rev 302

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

Line No. Rev Author Line
1 302 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/34319
7
!
8
! Check support of INF/NaN for I/O.
9
!
10
program main
11
  implicit none
12
  real :: r
13
  complex :: z
14
  character(len=30) :: str
15
 
16
  str = "nan"
17
  read(str,*) r
18
  if (.not.isnan(r)) call abort()
19
  str = "(nan,4.0)"
20
  read(str,*) z
21
  if (.not.isnan(real(z)) .or. aimag(z) /= 4.0) call abort()
22
  str = "(7.0,nan)"
23
  read(str,*) z
24
  if (.not.isnan(aimag(z)) .or. real(z) /= 7.0) call abort()
25
 
26
  str = "inFinity"
27
  read(str,*) r
28
  if (r <= huge(r)) call abort()
29
  str = "(+inFinity,4.0)"
30
  read(str,*) z
31
  if ((real(z) <= huge(r)) .or. aimag(z) /= 4.0) call abort()
32
  str = "(7.0,-inFinity)"
33
  read(str,*) z
34
  if ((aimag(z) >= -huge(r)) .or. real(z) /= 7.0) call abort()
35
 
36
  str = "inf"
37
  read(str,*) r
38
  if (r <= huge(r)) call abort()
39
  str = "(+inf,4.0)"
40
  read(str,*) z
41
  if ((real(z) <= huge(r)) .or. aimag(z) /= 4.0) call abort()
42
  str = "(7.0,-inf)"
43
  read(str,*) z
44
  if ((aimag(z) >= -huge(r)) .or. real(z) /= 7.0) call abort()
45
 
46
end program main

powered by: WebSVN 2.1.0

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