[Bug fortran/41911] Unnecessary copying of array descriptors

burnus at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Nov 2 22:00:00 GMT 2009



------- Comment #3 from burnus at gcc dot gnu dot org  2009-11-02 22:00 -------
Created an attachment (id=18951)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18951&action=view)
Example patch for trans-array.c; needs checking. Missing: Patch for
trans-decl.c

Proposed solution:

Create a descriptor right from the beginning in trans-decl - then there is no
need to do a conversion later on for the procedure call.

Something like the attached trans-array.c is then needed to make sure that one
does not create a temporary. However, one somehow should distinguish between
having a simple data pointer (like the current "a.0") versus having a pointer
to a array descriptor. -- The issue is that one gfc_symbol, those seem to be
indistinguishable -- on TREE level they are clearly different.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41911



More information about the Gcc-bugs mailing list