public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/99857] [11 Regression] FAIL: libgomp.c/declare-variant-1.c (test for excess errors) by r11-7926
Date: Fri, 09 Apr 2021 13:03:38 +0000	[thread overview]
Message-ID: <bug-99857-4-h3bf5foG5f@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99857-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99857

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Jan Hubicka from comment #6)
> Thanks for a testcase, it makes things easier to debug indeed :)
> The problem is that openmp uses declare_vairant_alt on symbols to make them
> special definitions, but the definition flag is not set.  That makes
> free_lang_data to call release_body and since the code depends on references
> things gets out of sync.
> 
> I am testing.
> 
> diff --git a/gcc/tree.c b/gcc/tree.c
> index 7c44c226a33..e4e74ac8afc 100644
> --- a/gcc/tree.c
> +++ b/gcc/tree.c
> @@ -5849,7 +5849,7 @@ free_lang_data_in_decl (tree decl, class
> free_lang_data_d *fld)
>        if (!(node = cgraph_node::get (decl))
>           || (!node->definition && !node->clones))
>         {
> -         if (node)
> +         if (node && !node->declare_variant_alt)
>             node->release_body ();
>           else
>             {

Or
-          || (!node->definition && !node->clones))
+          || (!node->definition && !node->clones &&
!node->declare_variant_alt))
?

  parent reply	other threads:[~2021-04-09 13:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-31 20:58 [Bug middle-end/99857] New: " hjl.tools at gmail dot com
2021-04-01  4:43 ` [Bug middle-end/99857] " marxin at gcc dot gnu.org
2021-04-01 12:22 ` hjl.tools at gmail dot com
2021-04-06 12:19 ` tschwinge at gcc dot gnu.org
2021-04-06 13:33 ` hubicka at ucw dot cz
2021-04-08  3:01 ` asolokha at gmx dot com
2021-04-08 14:25 ` rguenth at gcc dot gnu.org
2021-04-08 14:35 ` jakub at gcc dot gnu.org
2021-04-09 12:45 ` hubicka at gcc dot gnu.org
2021-04-09 13:03 ` jakub at gcc dot gnu.org [this message]
2021-04-10  9:18 ` cvs-commit at gcc dot gnu.org
2021-04-10 10:52 ` jakub at gcc dot gnu.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-99857-4-h3bf5foG5f@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).