This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/56691] Allocatable array of extended type, wrong indexes after passing to a subroutine
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 23 Mar 2013 09:36:39 +0000
- Subject: [Bug fortran/56691] Allocatable array of extended type, wrong indexes after passing to a subroutine
- Auto-submitted: auto-generated
- References: <bug-56691-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56691
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-03-23
CC| |burnus at gcc dot gnu.org
Ever Confirmed|0 |1
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-03-23 09:36:39 UTC ---
Interesting test case - it also fails with crayftn 8.1 and pgi 12.10 (for
those: both calls), but works with ifort 13.0.
The whole array call has (-fdump-tree-original):
work.dim[0].lbound = 1;
work.offset = -1;
class.6._data = work;
while for the failing, off-by-one call one has
parm.9.dim[0].lbound = 1;
parm.9.offset = 0;
class.8._data = parm.9;
Due to offset == -1 vs. 0, the off-by-one error occurs.