This is the mail archive of the gcc-bugs@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]

[Bug fortran/38726] [4.3/4.4 Regression] gfortran.dg/elemental_subroutine_7.f90 fail on Linux/ia64



------- 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


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