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/56691] Allocatable array of extended type, wrong indexes after passing to a subroutine


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.


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