public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/94947] [8/9/10/11 Regression] -fipa-pta + pthread_once crash since r6-5684-g47e5754e17e9ac3b
Date: Tue, 05 May 2020 11:04:42 +0000	[thread overview]
Message-ID: <bug-94947-4-Q5nGgZwM84@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-94947-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #3)
> In fact this situation doesn't seem to be handled at all - global variables
> are still an afterthought in IPA-PTA it seems.  Needs more work than a
> simple fix.

Hum, actually it's a simple bug and the following fixes it.

diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 416a26c996c..16a2b53c2b7 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -8187,8 +8187,8 @@ ipa_pta_execute (void)

       /* For the purpose of IPA PTA unit-local globals are not
          escape points.  */
-      bool nonlocal_p = (var->used_from_other_partition
-                        || var->externally_visible
+      bool nonlocal_p = (var->externally_visible_p ()
+                        || var->used_from_other_partition
                         || var->force_output);
       var->call_for_symbol_and_aliases (refered_from_nonlocal_var,
                                        &nonlocal_p, true);

  parent reply	other threads:[~2020-05-05 11:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04 22:07 [Bug ipa/94947] New: -fipa-pta + pthread_once crash corydoras at ridiculousfish dot com
2020-05-05  4:16 ` [Bug ipa/94947] [8/9/10/11 Regression] -fipa-pta + pthread_once crash since r6-5684-g47e5754e17e9ac3b marxin at gcc dot gnu.org
2020-05-05  6:59 ` rguenth at gcc dot gnu.org
2020-05-05  7:14 ` rguenth at gcc dot gnu.org
2020-05-05 11:04 ` rguenth at gcc dot gnu.org [this message]
2020-05-05 11:14 ` rguenth at gcc dot gnu.org
2020-05-05 12:41 ` cvs-commit at gcc dot gnu.org
2020-05-05 12:45 ` [Bug ipa/94947] [8/9/10 " rguenth at gcc dot gnu.org
2020-05-07 17:39 ` cvs-commit at gcc dot gnu.org
2020-05-13  7:24 ` cvs-commit at gcc dot gnu.org
2020-05-13  7:24 ` cvs-commit at gcc dot gnu.org
2020-09-11 10:38 ` [Bug ipa/94947] [8/9 " cvs-commit at gcc dot gnu.org
2020-09-11 10:38 ` cvs-commit at gcc dot gnu.org
2020-12-01 14:02 ` [Bug ipa/94947] [8 " cvs-commit at gcc dot gnu.org
2020-12-01 14:02 ` cvs-commit at gcc dot gnu.org
2020-12-01 14:03 ` rguenth 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-94947-4-Q5nGgZwM84@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).