public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/37577]  New: Change internal array descriptor format for better syntax, C interop TR, rank 15
Date: Thu, 18 Sep 2008 20:14:00 -0000	[thread overview]
Message-ID: <bug-37577-13404@http.gcc.gnu.org/bugzilla/> (raw)

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


             reply	other threads:[~2008-09-18 20:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-18 20:14 burnus at gcc dot gnu dot org [this message]
2008-09-19 18:55 ` [Bug fortran/37577] " tkoenig at gcc dot gnu dot org
2008-09-26 11:39 ` burnus at gcc dot gnu dot org
2009-03-29  9:14 ` fxcoudert at gcc dot gnu dot org
2009-05-08  6:28 ` tkoenig at gcc dot gnu dot org
2009-05-16 16:37 ` tkoenig at gcc dot gnu dot org
2009-05-22  5:34 ` tkoenig at gcc dot gnu dot org
2009-05-30 13:17 ` tkoenig at gcc dot gnu dot org
2009-06-21 19:25 ` tkoenig at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-37577-13404@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).