public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/65509] [5 Regression] [C++11] GCC rejects operator== with two distinct pointers as not constexpr Date: Wed, 25 Mar 2015 15:07:00 -0000 [thread overview] Message-ID: <bug-65509-4-JU5o3pQOWj@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-65509-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65509 --- Comment #8 from Marek Polacek <mpolacek at gcc dot gnu.org> --- The following (untested) should work: --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -6113,6 +6113,7 @@ make_rtl_for_nonlocal_decl (tree decl, tree init, const char* asmspec) not emitted into the object file unnecessarily. */ filename = LOCATION_FILE (input_location); if (!DECL_VIRTUAL_P (decl) + && !DECL_DECLARED_CONSTEXPR_P (decl) && TREE_READONLY (decl) && DECL_INITIAL (decl) != NULL_TREE && DECL_INITIAL (decl) != error_mark_node My reasoning is that we shouldn't defer assembling the variable if it might be needed in the constexpr context.
next prev parent reply other threads:[~2015-03-25 14:38 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-03-22 9:55 [Bug c++/65509] New: " kariya_mitsuru at hotmail dot com 2015-03-22 10:38 ` [Bug c++/65509] " daniel.kruegler at googlemail dot com 2015-03-22 12:55 ` mpolacek at gcc dot gnu.org 2015-03-25 8:54 ` [Bug c++/65509] [5 Regression] " mpolacek at gcc dot gnu.org 2015-03-25 9:04 ` jakub at gcc dot gnu.org 2015-03-25 10:07 ` jakub at gcc dot gnu.org 2015-03-25 11:45 ` jakub at gcc dot gnu.org 2015-03-25 12:42 ` daniel.kruegler at googlemail dot com 2015-03-25 14:44 ` mpolacek at gcc dot gnu.org 2015-03-25 15:07 ` mpolacek at gcc dot gnu.org [this message] 2015-03-25 15:35 ` jakub at gcc dot gnu.org 2015-03-25 15:39 ` mpolacek at gcc dot gnu.org 2015-03-27 16:37 ` jason at gcc dot gnu.org 2015-03-27 16:54 ` jason at gcc dot gnu.org 2015-03-27 16:54 ` jason at gcc dot gnu.org 2015-03-28 18:24 ` kariya_mitsuru at hotmail dot com 2015-03-28 18:31 ` kariya_mitsuru at hotmail dot com 2015-03-29 19:29 ` jason 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-65509-4-JU5o3pQOWj@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).