summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-30 22:31:20 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-30 22:31:20 +0000
commit98cdc32e7828071a68104dc86db105d51f76fe93 (patch)
treed3a0b4cebda946bffe4cc75ed2ed0e6ae4e99e58
parent929dd1104476f4bfbaba2288eab7a51df9851976 (diff)
downloadppe42-gcc-98cdc32e7828071a68104dc86db105d51f76fe93.tar.gz
ppe42-gcc-98cdc32e7828071a68104dc86db105d51f76fe93.zip
* gfortran.fortran-torture/execute/intrinsic_nearest.f90: Disable
tests of nearest around zero. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85361 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_nearest.f9021
2 files changed, 19 insertions, 7 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index f334409cd52..aaa540cc2bd 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2004-07-30 Richard Henderson <rth@redhat.com>
+
+ * gfortran.fortran-torture/execute/intrinsic_nearest.f90: Disable
+ tests of nearest around zero.
+
2004-07-30 Andrew Pinski <apinski@apple.com>
* gcc.c-torture/compile/20040730-1.c: New test.
diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_nearest.f90 b/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_nearest.f90
index 435c6795c5d..364a3ac345e 100644
--- a/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_nearest.f90
+++ b/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_nearest.f90
@@ -1,7 +1,7 @@
!Program to test NEAREST intrinsic function.
program test_nearest
- real s, r, x, y, inf, max, min
+ real s, r, x, y, inf, max
integer i, infi, maxi
equivalence (s,i)
equivalence (inf,infi)
@@ -25,19 +25,26 @@ program test_nearest
y = nearest(s, -r)
if (.not. (x .gt. s .and. y .lt. s )) call abort()
+! ??? This is pretty sketchy, but passes on most targets.
infi = z'7f800000'
maxi = z'7f7fffff'
- min = tiny(1.0)
call test_up(max, inf)
call test_up(-inf, -max)
- call test_up(0, min)
- call test_up(-min, 0)
-
call test_down(inf, max)
call test_down(-max, -inf)
- call test_down(0, -min)
- call test_down(min, 0)
+
+! ??? Here we require the F2003 IEEE_ARITHMETIC module to
+! determine if denormals are supported. If they are, then
+! nearest(0,1) is the minimum denormal. If they are not,
+! then it's the minimum normalized number, TINY. This fails
+! much more often than the infinity test above, so it's
+! disabled for now.
+
+! call test_up(0, min)
+! call test_up(-min, 0)
+! call test_down(0, -min)
+! call test_down(min, 0)
end
subroutine test_up(s, e)
OpenPOWER on IntegriCloud