From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20888 invoked by alias); 18 Sep 2008 20:14:56 -0000 Received: (qmail 20167 invoked by uid 48); 18 Sep 2008 20:13:30 -0000 Date: Thu, 18 Sep 2008 20:14:00 -0000 Subject: [Bug fortran/37577] New: Change internal array descriptor format for better syntax, C interop TR, rank 15 X-Bugzilla-Reason: CC Message-ID: 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: 2008-09/txt/msg02201.txt.bz2 There are a couple of issues with regards to the internal representation of arrays in gfortran. The solution is to revamp the internal format. The main format should match the "Further Interoperability with C" technical report (TR) which is currently developed. It further more needs to: - Support the distinction between pointer/allocatable targets and nondeallocatable targets -> PR 35718 - It could support a flag to store the contiguous status. Ifort has and it might make more sense than having to check it everytime when needed explicitly. (Or is this faster on average?) Need also to check CONTIGIOUS flag of F2008 - A storage allocated flag (as ifort has) for zero-sized arrays; currently a single item is allocated. - Be prepared for coarrays - they can be handled by the normal dim etc., but one might want to store information none the less. - Possibly save some space for extensions Internal format of ifort: http://www.intel.com/software/products/compilers/docs/flin/main_for/mergedProjects/bldaps_for/common/bldaps_hndl_arrdesc.htm "SC 22 N 4146, New Work Item Proposal for Further Interoperability with C, TR Type 2": Not yet publicly available; check status or ask your TR/WG5 contact ;-) The original proposal is available at http://j3-fortran.org/doc/year/06/06-171.txt For subref arrays, a byte-based approach should replace the span: > > Is there a plan to do it right with the next major ABI change (i.e. > > represent strides in bytes rather than elements and kill this span stuff)? > > I think there are comments about intending to go from 7 to 15 maximum rank > > and that will need ABI changes to the array descriptors anyway. > > At the time that subref array pointers were implemented, there was a > discussion on the list on how to do this. Changing the ABI for array > descriptors was favoured but nobody had the time to carry out the > necessary surgery. Therefore, I came up with the span kludge, which > arguably is worse than nothing:-( -- Summary: Change internal array descriptor format for better syntax, C interop TR, rank 15 Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org OtherBugsDependingO 20923,34528,35718,36825 nThis: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37577