This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/60322] [OOP] Incorrect bounds on polymorphic dummy array
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 23 Feb 2014 11:21:12 +0000
- Subject: [Bug fortran/60322] [OOP] Incorrect bounds on polymorphic dummy array
- Auto-submitted: auto-generated
- References: <bug-60322-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60322
--- Comment #2 from janus at gcc dot gnu.org ---
For both cases (TYPE and CLASS), the temporary that is created (to be passed to
copyFromArray) has an lbound of zero (as shown by -fdump-tree-original):
atmp.6.dim[0].stride = 1;
atmp.6.dim[0].lbound = 0;
atmp.6.dim[0].ubound = 0;
For the TYPE case, additional code (and another temporary) is generated inside
of copyFromArray, which resets the bounds:
parm.6.dim[0].lbound = 1;
parm.6.dim[0].ubound = D.2342;
So we just have to make sure that this additional code is also generated for
the CLASS case.
Or, why not directly start with lbound=1 for the original temporary?