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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [nan_5.f90] - Blame information for rev 862

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

Line No. Rev Author Line
1 302 jeremybenn
! Check that we correctly simplify ISNAN
2
!
3
! { dg-do compile }
4
!
5
! { dg-options "-fno-range-check" }
6
! { dg-add-options ieee }
7
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
8
 
9
  implicit none
10
  real, parameter :: inf = 2 * huge(inf)
11
  real, parameter :: nan1 = 0. / 0.
12
  real, parameter :: nan2 = 1.5 * nan1
13
  real, parameter :: nan3 = inf / inf
14
  real, parameter :: nan4 = inf - inf
15
  real, parameter :: nan5 = 0. * inf
16
  real, parameter :: normal = 42.
17
 
18
  integer(kind=merge(4, 0, isnan(nan1))) :: a
19
  integer(kind=merge(4, 0, isnan(nan2))) :: b
20
  integer(kind=merge(4, 0, isnan(nan3))) :: c
21
  integer(kind=merge(4, 0, isnan(nan4))) :: d
22
  integer(kind=merge(4, 0, isnan(nan5))) :: e
23
 
24
  integer(kind=merge(0, 4, isnan(inf))) :: f
25
  integer(kind=merge(0, 4, isnan(-inf))) :: g
26
  integer(kind=merge(0, 4, isnan(normal))) :: h
27
 
28
  end

powered by: WebSVN 2.1.0

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