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]

[gfortran testsuite, committed] Re: gfortran.dg/forall_1.f90


Andreas Jaeger wrote:
> The following tests fail for me on Linux/x86-64 now:
> 
>    gfortran.dg/forall_1.f90  -O1  execution test
>    gfortran.dg/forall_1.f90  -O2  execution test
>    gfortran.dg/forall_1.f90  -O3 -fomit-frame-pointer  execution test
>    gfortran.dg/forall_1.f90  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  execution test
>    gfortran.dg/forall_1.f90  -O3 -fomit-frame-pointer -funroll-loops  execution test
>    gfortran.dg/forall_1.f90  -O3 -g  execution test
> 
> Note that the test work correctly compiled as 32-bit binaries - they
> just fail as 64-bit tests.  The output is an "Aborted".
> 
...
> Tobias, any ideas?  Is the code they are testing not 64-bit clean?

The test made the assumption that
  if (i /= 0) i = 0
means that even if i is uninitialized in the beginning it will be zero
afterwards.  Since this is the only thing that could be affected by
optimization, I've committed this change to the mainline and I will also put
this on the 4.0 branch once testing finishes.

Does this cure the problem?

- Tobi

Index: testsuite/ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/ChangeLog,v
retrieving revision 1.5599
diff -u -p -r1.5599 ChangeLog
--- testsuite/ChangeLog 5 Jun 2005 18:03:42 -0000       1.5599
+++ testsuite/ChangeLog 5 Jun 2005 18:44:40 -0000
@@ -1,5 +1,7 @@
 2005-06-05  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>

+       * gfortran.dg/forall_1.f90: Set previously uninitialized variable.
+
        PR fortran/21912
        * gfortran.dg/array_constructor_4.f90: New test.

Index: testsuite/gfortran.dg/forall_1.f90
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gfortran.dg/forall_1.f90,v
retrieving revision 1.1
diff -u -p -r1.1 forall_1.f90
--- testsuite/gfortran.dg/forall_1.f90  4 Jun 2005 10:35:00 -0000       1.1
+++ testsuite/gfortran.dg/forall_1.f90  5 Jun 2005 18:44:43 -0000
@@ -7,6 +7,7 @@ type a
 end type a
 type(a) :: a1(10), a2(5,5)

+i1 = (/ 0, 1, 2, 3, 4, 0, 6, 7, 8, 9, 10, 0, 0, 13, 14 /)
 forall (i=1:15, i1(i) /= 0)
    i1(i) = 0
 end forall


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