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]

Re: Revision 162491 -- fortran -fwhole-file regressions


Tobias Burnus wrote:
> I will change the tests to use   "abs(a-b) > epsilon(a)"  instead of "(a
> /= b)".
>   

For integer_exponentiation_3.F90 I could not use "eps" as the check
contains nearest.Thus, I use -ffloat-store.

Committed as Rev. 162498.

Tobias
Index: gcc/testsuite/ChangeLog
===================================================================
--- gcc/testsuite/ChangeLog	(Revision 162497)
+++ gcc/testsuite/ChangeLog	(Arbeitskopie)
@@ -1,5 +1,10 @@
 2010-07-24  Tobias Burnus  <burnus@net-b.de>
 
+	* gfortran.dg/entry_13.f90: Use abs() > eps instead of "/=".
+	* gfortran.dg/integer_exponentiation_3.F90: Use -ffloat-store.
+
+2010-07-24  Tobias Burnus  <burnus@net-b.de>
+
 	* gfortran.dg/func_decl_4.f90: Split test into two ...
 	* gfortran.dg/func_decl_5.f90: ... parts.
 	* gfortran.dg/common_resize_1.f: xfail two warnings (cf. PR 45045).
Index: gcc/testsuite/gfortran.dg/entry_13.f90
===================================================================
--- gcc/testsuite/gfortran.dg/entry_13.f90	(Revision 162497)
+++ gcc/testsuite/gfortran.dg/entry_13.f90	(Arbeitskopie)
@@ -67,14 +67,14 @@
   type(z) z1
 
   z1 = x1//y1
-  if (z1%x .ne. 19.0_4 + 7.0_4) call abort ()
+  if (abs(z1%x - (19.0_4 + 7.0_4)) > epsilon(x1%x)) call abort ()
   z1 = y1//x1
-  if (z1%x .ne. 19.0_4 - 7.0_4) call abort ()
+  if (abs(z1%x - (19.0_4 - 7.0_4)) > epsilon(x1%x)) call abort ()
 
   z1 = x1==y1
-  if (z1%x .ne. 19.0_4/7.0_4) call abort ()
+  if (abs(z1%x - 19.0_4/7.0_4) > epsilon(x1%x)) call abort ()
   z1 = y1==x1
-  if (z1%x .ne. 19.0_4/7.0_4) call abort ()
+  if (abs(z1%x - 19.0_4/7.0_4) > epsilon(x1%x)) call abort ()
 end program test
 ! { dg-final { cleanup-modules "type_mod" } }
 
Index: gcc/testsuite/gfortran.dg/integer_exponentiation_3.F90
===================================================================
--- gcc/testsuite/gfortran.dg/integer_exponentiation_3.F90	(Revision 162497)
+++ gcc/testsuite/gfortran.dg/integer_exponentiation_3.F90	(Arbeitskopie)
@@ -1,6 +1,9 @@
 ! { dg-do run { xfail spu-*-* } }
 ! FAILs on SPU because of wrong compile-time rounding mode
-! { dg-options "" }
+! { dg-options "-ffloat-store" }
+!
+! -ffloat-store needed for x87
+!
 module mod_check
   implicit none
 

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