From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4468 invoked by alias); 25 Jun 2009 16:05:00 -0000 Received: (qmail 1167 invoked by uid 48); 25 Jun 2009 16:04:43 -0000 Date: Thu, 25 Jun 2009 16:05:00 -0000 Message-ID: <20090625160443.1163.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/40551] Wrong code due to missing copy-in/copy-out stried array to assumed-size dummy 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-06/txt/msg01865.txt.bz2 ------- Comment #5 from burnus at gcc dot gnu dot org 2009-06-25 16:04 ------- I think I would go for option (b) of creating a new array descriptor, which is then used for copy out. The place where currently the creation of a temporary is prevented is: gfc_trans_arrayfunc_assign If the return symbol is assumed shape, deferred shape (pointer, allocatable) or the actual is known to be contiguous (whole array, which is not an assumed-shape/deferred-shape dummy) one can continue as is, otherwise one needs to pack the arrays. (Todo: Check that no copy in happens.) At some point, we need a contiguous check - also for F2008's CONTIGUOUS attribute. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40551