------- Comment #6 from dominiq at lps dot ens dot fr 2009-01-05 14:47 ------- 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. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38726