Fix libgomp Fortran tests
Steve Kargl
sgk@troutmask.apl.washington.edu
Thu Sep 7 23:54:00 GMT 2006
The attached patch fixes 2 problems in the libgomp testsuite.
The Fortran tried to use the most negative integer value, but
this cause an overflow because gfortran creates this value
via a unary minus operation.
2006-09-07 Steven G. Kargl <kargls@comcast.net>
* libgomp/testsuite/libgomp.fortran/reduction3.f90: Fix integer
overflow.
* libgomp/testsuite/libgomp.fortran/reduction4.f90: Ditto.
--
Steve
-------------- next part --------------
Index: libgomp/testsuite/libgomp.fortran/reduction3.f90
===================================================================
--- libgomp/testsuite/libgomp.fortran/reduction3.f90 (revision 116723)
+++ libgomp/testsuite/libgomp.fortran/reduction3.f90 (working copy)
@@ -17,7 +17,7 @@
!$omp parallel num_threads (3) private (n) reduction (.or.:v) &
!$omp & reduction (max:i, ia, r, ra, d, da)
-!$ if (i .ne. -2147483648 .or. any (ia .ne. -2147483648)) v = .true.
+!$ if (i .ne. -huge(i)-1 .or. any (ia .ne. -huge(ia)-1)) v = .true.
!$ if (r .ge. -1.0d38 .or. any (ra .ge. -1.0d38)) v = .true.
!$ if (d .ge. -1.0d300 .or. any (da .ge. -1.0d300)) v = .true.
n = omp_get_thread_num ()
Index: libgomp/testsuite/libgomp.fortran/reduction4.f90
===================================================================
--- libgomp/testsuite/libgomp.fortran/reduction4.f90 (revision 116723)
+++ libgomp/testsuite/libgomp.fortran/reduction4.f90 (working copy)
@@ -12,7 +12,7 @@
ka = Z'05a5a5'
v = .false.
cnt = -1
- x = Z'ffffffff'
+ x = - huge(x) - 1
!$omp parallel num_threads (3) private (n) reduction (.or.:v) &
!$omp & reduction (iand:i, ia) reduction (ior:j, ja) reduction (ieor:k, ka)
More information about the Fortran
mailing list