From: Jakub Jelinek <jakub@redhat.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: Tobias Burnus <tobias@codesourcery.com>,
sgk@troutmask.apl.washington.edu,
gcc-patches <gcc-patches@gcc.gnu.org>,
fortran <fortran@gcc.gnu.org>,
Paul Richard Thomas <paul.richard.thomas@gmail.com>
Subject: Re: [Patch] Fortran: Avoid SAVE_EXPR for deferred-len char types
Date: Tue, 21 Feb 2023 10:44:34 +0100 [thread overview]
Message-ID: <Y/SSgvd2LjfZZv6F@tucnak> (raw)
In-Reply-To: <CAFiYyc2zc0-UG6OexqwZ1UqGc9NvcjkZZWdtbUXdJJgaq-PfaQ@mail.gmail.com>
On Tue, Feb 21, 2023 at 08:30:50AM +0100, Richard Biener wrote:
> > I think this mostly helps with access inside the FE of the type 'size =
> > TYPE_SIZE_UNIT(type)', which is used surprisingly often and is often
> > directly evaluated (i.e. assigned to a temporary).
>
> that's what I thought
So, either we can do a temporary hack where we stick the non-SAVE_EXPR
in there but somehow mark those types in type_lang_specific (if they
aren't yet) and clear that when passing the type from FE to the middle-end.
Or, stick some bogus value into TYPE_SIZE_UNIT (error_mark_node or something
worse that triggers ICEs all around, say VOID_CST) and fix up what breaks,
say add a short function which will replace TYPE_SIZE_UNIT (type) and
do if (TYPE_LANG_SPECIFIC (type) && deferred_len (type)) return
some_type_lang_specific_field (type); else return TYPE_SIZE_UNIT (type)
and replace those. Or mass replace TYPE_SIZE_UNIT (type) in the FE with
the new function. Though, there surely are spots for which deferred-len
types may never appear...
Jakub
prev parent reply other threads:[~2023-02-21 9:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-17 11:13 Tobias Burnus
2023-02-17 16:27 ` Steve Kargl
2023-02-20 6:56 ` Tobias Burnus
2023-02-20 7:24 ` Steve Kargl
2023-02-20 10:41 ` Richard Biener
2023-02-20 11:07 ` Tobias Burnus
2023-02-20 11:15 ` Jakub Jelinek
2023-02-20 11:48 ` Tobias Burnus
2023-02-20 11:56 ` Jakub Jelinek
2023-02-20 12:46 ` Richard Biener
2023-02-20 16:23 ` Tobias Burnus
2023-02-21 7:30 ` Richard Biener
2023-02-21 9:44 ` Jakub Jelinek [this message]
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=Y/SSgvd2LjfZZv6F@tucnak \
--to=jakub@redhat.com \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=paul.richard.thomas@gmail.com \
--cc=richard.guenther@gmail.com \
--cc=sgk@troutmask.apl.washington.edu \
--cc=tobias@codesourcery.com \
/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).