re PR testsuite/38946 (gcc trunk 143562 - Testsuite - gfortran failing tests that...
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Fri, 25 Jun 2010 21:32:37 +0000 (21:32 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Fri, 25 Jun 2010 21:32:37 +0000 (21:32 +0000)
2010-06-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR testsuite/38946
* gfortran.dg/array_constructor_23.f: Update test to allow for small
error in comparing reals.

From-SVN: r161416

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/array_constructor_23.f

index 8365f765322db6f50fec3769da616408faa3f916..88f6e03cbb8f911be498f8f31be70bc2414475e5 100644 (file)
@@ -1,3 +1,9 @@
+2010-06-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR testsuite/38946
+       * gfortran.dg/array_constructor_23.f: Update test to allow for small
+       error in comparing reals.
+
 2010-06-25  Tobias Burnus  <burnus@net-b.de>
 
        * selected_real_kind_2.f90: New.
index ac57efc2440802c034a5a70e62cee694b28d4e33..fa0a28a1f1782e058d6bbedc6fc01ff116c2b4b6 100644 (file)
@@ -20,7 +20,7 @@
       DDA1 = ATAN2 ((/(REAL(J1,KV),J1=1,10)/),
      $                 REAL((/(J1,J1=nf10,nf1,mf1)/), KV))   !fails
       DDA2 = ATAN2 (DDA, DDA(10:1:-1))
-      if (any (DDA1 .ne. DDA2)) call abort ()
+      if (any (DDA1 - DDA2 .gt. epsilon(dval))) call abort ()
       END
 
       subroutine FA6077 (nf10,nf1,mf1, ida)
@@ -42,7 +42,7 @@
       QDA1 = MOD ( 1.1_k*( QDA(1) -5.0_k), P=( QDA -2.5_k))
       DO J1 = 1,10
         QVAL = MOD(1.1_k*(QDA(1)-5.0_k),P=(QDA(J1)-2.5_k))
-        if (qval .ne. qda1(j1)) call abort ()
+        if (qval - qda1(j1) .gt. epsilon(qval)) call abort ()
       ENDDO
       END