This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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/16289


The representation of the smallest non-negative real isn't portable.
Fixed thus.

The other hex "constants" are ok on irix 32-bit ABI.  I suspect 
some tests with the 64-bit ABI will lead to a follow-up patch.

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

	PR fortran/16289
	* gfortran.fortran-torture/execute/intrinsic_nearest.f90
	Use tiny() intrinsic to find smallest non-negative real


--- gfortran.fortran-torture/execute/intrinsic_nearest.f90      13 May 2004 06:40:53 -0000      1.2
+++ gfortran.fortran-torture/execute/intrinsic_nearest.f90      30 Jun 2004 03:16:59 -0000
@@ -2,11 +2,10 @@
 
 program test_nearest
   real s, r, x, y, inf, max, min
-  integer i, infi, maxi, mini
+  integer i, infi, maxi
   equivalence (s,i)
   equivalence (inf,infi)
   equivalence (max,maxi)
-  equivalence (min,mini)
 
   r = 2.0
   s = 3.0
@@ -28,7 +27,7 @@
 
   infi = z'7f800000'
   maxi = z'7f7fffff'
-  mini = 1
+  min = tiny(1.0)
 
   call test_up(max, inf)
   call test_up(-inf, -max)


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