This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/38726] [4.3/4.4 Regression] gfortran.dg/elemental_subroutine_7.f90 fail on Linux/ia64
- From: "mikael at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Jan 2009 15:08:39 -0000
- Subject: [Bug fortran/38726] [4.3/4.4 Regression] gfortran.dg/elemental_subroutine_7.f90 fail on Linux/ia64
- References: <bug-38726-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from mikael at gcc dot gnu dot org 2009-01-05 15:08 -------
(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.
--
mikael at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.3.3 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38726