public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Thomas Koenig <tkoenig@netcologne.de>
Cc: Richard Biener <richard.guenther@gmail.com>,
	       Janne Blomqvist <blomqvist.janne@gmail.com>,
	       "fortran@gcc.gnu.org" <fortran@gcc.gnu.org>,
	       gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [patch, libfortran] Use flexible array members for array descriptor
Date: Mon, 12 Feb 2018 20:49:00 -0000	[thread overview]
Message-ID: <20180212200952.GH5867@tucnak> (raw)
In-Reply-To: <633fa818-05fb-a2e8-3ac1-c74a59df3233@netcologne.de>

On Mon, Feb 12, 2018 at 08:41:56PM +0100, Thomas Koenig wrote:
> Am 08.02.2018 um 12:27 schrieb Richard Biener:
> > If the effect of the patch is (it doesn't include generated files) that the
> > function arguments now have pointers to array descriptor types with
> > the flexible array then yes, that's what will be needed anyways, no need
> > for any dust to settle here.
> 
> All right.
> 
> I have attached the patch updated with Janne's comments.
> 
> Regression-tested. OK for trunk then?

For the library part, you could have just used a single
GFC_ARRAY_DESCRIPTOR macro, just use
GFC_ARRAY_DESCRIPTOR (, GFC_INTEGER_1) etc. when you want the flexible
array member.

The compiler side will be harder, wonder if we want to always use
as the TREE_TYPE of things what we use right now and have somewhere
in the lang_specific part a pointer to a type with flexible array member
and whenever trying to dereference something build a MEM_REF with the
flexible array member type; plus whenever passing it to some other function.
Or if we have some easy way to find out what objects will need local
variables with descriptors (those need the non-flexible array member stuff)
and others (e.g. dummy arguments etc.) where we could use just the flexible
array members.

	Jakub

  parent reply	other threads:[~2018-02-12 20:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-04 19:49 Thomas Koenig
2018-02-05 12:09 ` Janne Blomqvist
2018-02-05 20:53   ` Thomas Koenig
2018-02-06  8:53     ` Janne Blomqvist
2018-02-06 22:28       ` Thomas Koenig
2018-02-08 11:27   ` Richard Biener
2018-02-12 19:42     ` Thomas Koenig
2018-02-12 19:47       ` Janne Blomqvist
2018-02-12 20:49       ` Jakub Jelinek [this message]
2018-02-12 21:50         ` Thomas Koenig

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=20180212200952.GH5867@tucnak \
    --to=jakub@redhat.com \
    --cc=blomqvist.janne@gmail.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.guenther@gmail.com \
    --cc=tkoenig@netcologne.de \
    /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).