From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12500 invoked by alias); 2 Nov 2009 22:00:26 -0000 Received: (qmail 12444 invoked by uid 48); 2 Nov 2009 22:00:14 -0000 Date: Mon, 02 Nov 2009 22:00:00 -0000 Message-ID: <20091102220014.12443.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/41911] Unnecessary copying of array descriptors In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-11/txt/msg00121.txt.bz2 ------- 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