public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "bugdal at aerifal dot cx" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/61144] [4.9/4.10 Regression] Invalid optimizations for extern vars with local weak definitions Date: Tue, 20 May 2014 08:31:00 -0000 [thread overview] Message-ID: <bug-61144-4-jlMOCZzTio@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-61144-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61144 --- Comment #20 from Rich Felker <bugdal at aerifal dot cx> --- On further investigation, it looks like the code I cited deals with strong aliases as well as weak ones, and in the strong alias case, the strong folding behavior might be desirable. A better fix seems to be adding an explicit check for weak aliases (DECL_WEAK(decl)) when an alias is found and returning error_mark_node in that case. Note that prior to the above-mentioned commit, the !TREE_READONLY(decl) case was always treated as non-foldable, so there seems to have been no subtlety to avoiding errors with weak aliases. But the new code performs much more aggressive constant folding and thus needs to avoid stepping on weak aliases.
next prev parent reply other threads:[~2014-05-20 8:31 UTC|newest] Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-05-11 1:30 [Bug c/61144] New: " bugdal at aerifal dot cx 2014-05-11 3:20 ` [Bug c/61144] " pinskia at gcc dot gnu.org 2014-05-11 3:32 ` bugdal at aerifal dot cx 2014-05-11 3:33 ` bugdal at aerifal dot cx 2014-05-11 19:05 ` bugdal at aerifal dot cx 2014-05-11 19:41 ` pinskia at gcc dot gnu.org 2014-05-11 20:05 ` bugdal at aerifal dot cx 2014-05-12 4:18 ` cloos at jhcloos dot com 2014-05-12 13:23 ` jody at jodybruchon dot com 2014-05-12 13:59 ` cloos at jhcloos dot com 2014-05-12 17:42 ` bugdal at aerifal dot cx 2014-05-12 19:02 ` bugdal at aerifal dot cx 2014-05-12 20:31 ` glisse at gcc dot gnu.org 2014-05-13 3:26 ` bugdal at aerifal dot cx 2014-05-13 8:45 ` glisse at gcc dot gnu.org 2014-05-13 11:19 ` [Bug ipa/61144] [4.9/4.10 Regression] " rguenth at gcc dot gnu.org 2014-05-14 5:08 ` bugdal at aerifal dot cx 2014-05-20 8:31 ` bugdal at aerifal dot cx [this message] 2014-05-20 20:28 ` bugdal at aerifal dot cx 2014-06-26 13:05 ` rguenth at gcc dot gnu.org 2014-06-26 13:36 ` bugdal at aerifal dot cx 2014-07-02 12:23 ` patrick at parcs dot ath.cx 2014-07-02 14:47 ` bugdal at aerifal dot cx 2014-07-14 16:12 ` amonakov at gcc dot gnu.org 2014-07-14 16:13 ` amonakov at gcc dot gnu.org 2014-07-16 13:30 ` jakub at gcc dot gnu.org 2014-07-16 18:17 ` bugdal at aerifal dot cx 2014-07-30 9:14 ` hubicka at gcc dot gnu.org 2014-07-31 22:56 ` bugdal at aerifal dot cx 2014-10-05 4:56 ` [Bug ipa/61144] [4.9/5 " hubicka at gcc dot gnu.org 2014-10-05 4:56 ` hubicka at gcc dot gnu.org 2014-10-05 4:56 ` hubicka at gcc dot gnu.org 2014-10-05 4:58 ` hubicka 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-61144-4-jlMOCZzTio@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: linkBe 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).