This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/41911] Unnecessary copying of array descriptors
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Nov 2009 22:00:14 -0000
- Subject: [Bug fortran/41911] Unnecessary copying of array descriptors
- References: <bug-41911-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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