public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "amonakov at gcc dot gnu.org" <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: Mon, 14 Jul 2014 16:12:00 -0000 [thread overview] Message-ID: <bug-61144-4-G1gsRCevzK@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 Alexander Monakov <amonakov at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amonakov at gcc dot gnu.org --- Comment #25 from Alexander Monakov <amonakov at gcc dot gnu.org> --- I have tried to bootstrap and regtest the patch (to be attached) that reflects the latest comments on the mailing list (except the concern raised by Jan about C++ optimization). Unfortunately the patch regresses the following simple C++ testcase, not folding the conditional access to the constant (even at -O3), but not emitting the constant either and thus causing an undefined reference at link time. Uncommenting the commented line allows folding but also emits the definition of the static member, increasing .rodata size. It seems odd to me that decl_replaceable_p(z::cst) is true, and that for instance TREE_PUBLIC(z::cst) is true. Any help here please? struct z { static const int cst = 1; }; // const int z::cst; int foo(int cond) { return cond ? z::cst : 0; }
next prev parent reply other threads:[~2014-07-14 16:12 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 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 [this message] 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-G1gsRCevzK@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).