On Linux/ia64, revision 143058 gave FAIL: gfortran.dg/elemental_subroutine_7.f90 -O0 execution test
The executable aborts on powerpc-apple-darwin9 (r143074) when compiled with -m32, but passes when compiled with -m64.
See also http://gcc.gnu.org/ml/gcc-testresults/2009-01/msg00421.html for powerpc-apple-darwin8.5.0.
(In reply to comment #0) > On Linux/ia64, revision 143058 gave > > FAIL: gfortran.dg/elemental_subroutine_7.f90 -O0 execution test > According to the gcc-testresults mailing list, this is confirmed on powerpc-ibm-aix5.3.0.0, ia64-unknown-linux-gnu, powerpc-apple-darwin8.5.0. It's not really a regression though, as I introduced the failing testcase as part of revision 143057. Please can someone test on older revisions/provide more information? Without access to such machines, it will be hard to find the culprit.
(In reply to comment #3) > Please can someone test on older revisions/provide more information? The test passes with gfortran 4.2.3, but not 4.3.2 on powerpc-apple-darwin9. Hence it is a regression.
Marking as regression according to Dominique's comment.
If compiled with -fbounds-check, the executable yields: At line 29 of file /opt/gcc/_gcc_clean/gcc/testsuite/gfortran.dg/elemental_subroutine_7.f90 Fortran runtime error: Array reference out of bounds for array 'p', lower bound of dimension 1 exceeded(-2 < 1) The problem comes from ... p = 20 * r - 10 ... call tq_tvgh (q(k_lev:), (p(p(k_lev:)))) if (any (p(p) /= q)) call abort where min(p)=-10, outside the bounds of p(1:42). If I use ' p = 41 * r + 1', the test passes.
(In reply to comment #6) > If compiled with -fbounds-check, the executable yields: > > At line 29 of file > /opt/gcc/_gcc_clean/gcc/testsuite/gfortran.dg/elemental_subroutine_7.f90 > Fortran runtime error: Array reference out of bounds for array 'p', lower bound > of dimension 1 exceeded(-2 < 1) > > The problem comes from > > ... > p = 20 * r - 10 > ... > call tq_tvgh (q(k_lev:), (p(p(k_lev:)))) > if (any (p(p) /= q)) call abort > > where min(p)=-10, outside the bounds of p(1:42). > > If I use ' p = 41 * r + 1', the test passes. > Yes, of course. Stupid me. I started with the random thing, and I added the vector subscript later. Thanks Dominique.
Subject: Bug 38726 Author: mikael Date: Mon Jan 5 18:44:09 2009 New Revision: 143084 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143084 Log: 2009-01-05 Mikael Morin <mikael.morin@tele2.fr> PR fortran/38669 PR fortran/38726 * gfortran.dg/elemental_subroutine_7.f90: Fix p values so that it can be used as vector subscript. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gfortran.dg/elemental_subroutine_7.f90
Looks like it's fixed now. Thanks for the report. Closing.