[Bug fortran/57522] New: [F03] ASSOCIATE construct creates array descriptor with incorrect stride for derived type array component
alan.briolat at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Jun 4 09:18:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57522
Bug ID: 57522
Summary: [F03] ASSOCIATE construct creates array descriptor
with incorrect stride for derived type array component
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: alan.briolat at gmail dot com
Created attachment 30254
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30254&action=edit
Code demonstrating the bug
The attached code demonstrates a bug (reproducible on 4.6 to 4.9) where using
ASSOCIATE to reference a derived type component in an array appears to have the
wrong stride. The output is:
0 1 2 3
0 4 1 5
when it should be (and is under ifort):
0 1 2 3
0 1 2 3
This is probably related to bug 49636, but is a simpler case. It's also
probably related to http://gcc.gnu.org/wiki/ArrayDescriptorUpdate (which I
found via that bug). However, if the changes necessary to support this sort of
reference are "future ABI-breaking work", then the current version really
should warn/error rather than generating the wrong stride and silently doing
the wrong thing.
More information about the Gcc-bugs
mailing list