From: Jakub Jelinek <jakub@redhat.com>
To: Tobias Burnus <tobias@codesourcery.com>
Cc: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org,
Thomas Schwinge <thomas@codesourcery.com>
Subject: Re: [Patch] OpenMP: Avoid ICE with LTO and 'omp allocate (was: [Patch] Fortran: Support OpenMP's 'allocate' directive for stack vars)
Date: Wed, 18 Oct 2023 13:01:18 +0200 [thread overview]
Message-ID: <ZS+6/uo9c2btW4mP@tucnak> (raw)
In-Reply-To: <8d407d7b-c546-4454-92c1-707ef00f0ba0@codesourcery.com>
On Wed, Oct 18, 2023 at 12:56:01PM +0200, Tobias Burnus wrote:
> On 18.10.23 11:36, Jakub Jelinek wrote:
> > On Wed, Oct 18, 2023 at 11:12:44AM +0200, Thomas Schwinge wrote:
> > > +FAIL: gfortran.dg/gomp/allocate-13.f90 -O (internal compiler error: tree code 'statement_list' is not supported in LTO streams)
> > Any references to GENERIC code in clauses etc. should have been gimplified
> > or cleared during gimplification, we shouldn't support STATEMENT_LIST
> > in LTO streaming.
>
> We only needed the statement list as aid during the gimplify.cc handling
> of GOMP_alloc/GOMP_free for Fortran. How about just remove_attribute it
> in that case? As discussed, as DECL_ATTRIBUTE gets added from the left
> to the DECL_CHAIN, there shouldn't be a problem of introducing shared
> trees; note that 'omp allocate' itself is added per DECL, i.e. it does
> not introduce sharing itself, either.
>
> Tested with x86-64-gnu-linux.
>
> Tobias
> -----------------
> Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
> OpenMP: Avoid ICE with LTO and 'omp allocate'
>
> gcc/ChangeLog:
>
> * gimplify.cc (gimplify_bind_expr): Remove "omp allocate" attribute
> to avoid that auxillary statement list reaches to LTO.
>
> gcc/testsuite/ChangeLog:
>
> * gfortran.dg/gomp/allocate-13a.f90: New test.
LGTM.
Jakub
prev parent reply other threads:[~2023-10-18 11:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-10 16:46 [Patch] Fortran: Support OpenMP's 'allocate' directive for stack vars Tobias Burnus
2023-10-13 11:01 ` Jakub Jelinek
2023-10-13 13:29 ` Tobias Burnus
2023-10-18 9:12 ` Thomas Schwinge
2023-10-18 9:36 ` Jakub Jelinek
2023-10-18 10:56 ` [Patch] OpenMP: Avoid ICE with LTO and 'omp allocate (was: [Patch] Fortran: Support OpenMP's 'allocate' directive for stack vars) Tobias Burnus
2023-10-18 11:01 ` 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=ZS+6/uo9c2btW4mP@tucnak \
--to=jakub@redhat.com \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=thomas@codesourcery.com \
--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).