This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch for fortran/16290


Test intrinsic_set_exponent.f90 fails on irix6.5 as it is 
using exponents smaller than minexponent(x).  Fixed thus.

OK to commit?

2004-06-30  David Billinghurst  (David.Billinghurst@riotinto.com)

	PR fortran/16290
	* gfortran.fortran-torture/execute/intrinsic_set_exponent.f90
	Don't use values of n smaller than minexponent(x).

--- intrinsic_set_exponent.f90  13 May 2004 06:40:53 -0000      1.2
+++ intrinsic_set_exponent.f90  30 Jun 2004 04:52:09 -0000
@@ -12,7 +12,7 @@
   n = -148
   x = 1024.0
   y = set_exponent (x, n)
-  if (exponent (y) .ne. n) call abort()
+  if (n .ge. minexponent(x) .and. exponent (y) .ne. n) call abort()
 
   n = 8
   x = 1024.0
@@ -27,7 +27,7 @@
   n = -148
   x = -1024.0
   y = set_exponent (x, n)
-  if (exponent (y) .ne. n) call abort()
+  if (n .ge. minexponent(x) .and. exponent (y) .ne. n) call abort()
 
   n = 8
   x = -1024.0
@@ -51,7 +51,7 @@
   n = -1073
   x = 1024.0_8
   y = set_exponent (x, n)
-  if (exponent (y) .ne. n) call abort()
+  if (n .ge. minexponent(x) .and. exponent (y) .ne. n) call abort()
 
   n = 8
   x = 1024.0_8
@@ -73,7 +73,7 @@
   x = -1024.0
   y = set_exponent (x, n)
   low = z'00000001'
-  if (exponent (y) .ne. n) call abort()
+  if (n .ge. minexponent(x) .and. exponent (y) .ne. n) call abort()
 
   n = 8
   x = -1024.0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]