Patchwork Revision 162491 -- fortran -fwhole-file regressions

login
register
mail settings
Submitter Tobias Burnus
Date July 24, 2010, 7:48 a.m.
Message ID <4C4A9AB8.3070302@net-b.de>
Download mbox | patch
Permalink /patch/59850/
State New
Headers show

Comments

Tobias Burnus - July 24, 2010, 7:48 a.m.
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
Steven Bosscher - July 24, 2010, 10:01 a.m.
On Sat, Jul 24, 2010 at 9:48 AM, Tobias Burnus <burnus@net-b.de> wrote:
> 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.

Maybe use float-store only for x86 in 32 bits mode?
Tobias Burnus - July 24, 2010, 11:59 a.m.
Steven Bosscher wrote:
> On Sat, Jul 24, 2010 at 9:48 AM, Tobias Burnus <burnus@net-b.de> wrote:
>>
>> For integer_exponentiation_3.F90 I could not use "eps" as the check
>> contains nearest.Thus, I use -ffloat-store.
>
> Maybe use float-store only for x86 in 32 bits mode?

You mean something like the following?

Tobias

--- gcc/testsuite/gfortran.dg/integer_exponentiation_3.F90
(revision 162498)
+++ gcc/testsuite/gfortran.dg/integer_exponentiation_3.F90      (working
copy)
@@ -1,8 +1,7 @@
 ! { dg-do run { xfail spu-*-* } }
 ! FAILs on SPU because of wrong compile-time rounding mode
-! { dg-options "-ffloat-store" }
+! { dg-options "-ffloat-store" { target i?86-*-* } }
 !
-! -ffloat-store needed for x87
 !
 module mod_check
   implicit none
Steven Bosscher - July 24, 2010, 12:01 p.m.
On Sat, Jul 24, 2010 at 1:59 PM, Tobias Burnus <burnus@net-b.de> wrote:
> Steven Bosscher wrote:
>> On Sat, Jul 24, 2010 at 9:48 AM, Tobias Burnus <burnus@net-b.de> wrote:
>>>
>>> For integer_exponentiation_3.F90 I could not use "eps" as the check
>>> contains nearest.Thus, I use -ffloat-store.
>>
>> Maybe use float-store only for x86 in 32 bits mode?
>
> You mean something like the following?

Yes.

Ciao!
Steven

Patch

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