public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "reichelt at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/58609] New: [4.9 Regression] [c++11] ICE with uninitialized variable in constexpr Date: Thu, 03 Oct 2013 21:20:00 -0000 [thread overview] Message-ID: <bug-58609-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58609 Bug ID: 58609 Summary: [4.9 Regression] [c++11] ICE with uninitialized variable in constexpr Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "-std=c++11") triggers an ICE on trunk (since at least GCC 4.9.0 20130920): =================================== struct A { static constexpr int&& i = 0; }; int j = A::i; =================================== bug.cc:3:30: error: non-constant in-class initialization invalid for static member 'A::i' static constexpr int&& i = 0; ^ bug.cc:3:30: error: (an out of class initialization is required) cc1plus: internal compiler error: in record_reference, at cgraphbuild.c:66 0x7ff843 record_reference ../../gcc/gcc/cgraphbuild.c:66 0xcf44ab walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, pointer_set_t*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, pointer_set_t*)) ../../gcc/gcc/tree.c:10928 0xcf48e5 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, pointer_set_t*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, pointer_set_t*)) ../../gcc/gcc/tree.c:11191 0x8001fd record_references_in_initializer(tree_node*, bool) ../../gcc/gcc/cgraphbuild.c:427 0xd2ce67 varpool_analyze_node(varpool_node*) ../../gcc/gcc/varpool.c:398 0x804147 analyze_functions ../../gcc/gcc/cgraphunit.c:1035 0x805669 finalize_compilation_unit() ../../gcc/gcc/cgraphunit.c:2260 0x6188a0 cp_write_global_declarations() ../../gcc/gcc/cp/decl2.c:4360 Please submit a full bug report, [etc.]
next reply other threads:[~2013-10-03 21:20 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-10-03 21:20 reichelt at gcc dot gnu.org [this message] 2013-10-10 11:39 ` [Bug c++/58609] " rguenth at gcc dot gnu.org 2013-11-05 14:47 ` rguenth at gcc dot gnu.org 2014-02-03 10:36 ` paolo.carlini at oracle dot com 2014-03-07 18:34 ` paolo at gcc dot gnu.org 2014-03-07 18:34 ` paolo.carlini at oracle dot com
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-58609-4@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).