public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "andyg1001 at hotmail dot co.uk" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/52282] [C++0x] ICE / confused by earlier errors with decltype/constexpr Date: Fri, 04 May 2012 16:22:00 -0000 [thread overview] Message-ID: <bug-52282-4-7lBPJkdeBC@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-52282-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52282 --- Comment #3 from andyg1001 at hotmail dot co.uk 2012-05-04 16:22:21 UTC --- This ICE still occurs in the release version of gcc 4.7.0. Here is the output from compiling the attached test-case as is: $ g++-4.7 -std=c++11 ice.cpp ice.cpp: In instantiation of ‘struct Z<const int*, (& a)>’: ice.cpp:39:33: required from here ice.cpp:11:41: internal compiler error: in finish_decltype_type, at cp/semantics.c:5277 Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions. Preprocessed source stored into /tmp/ccPyRnUB.out file, please attach this to your bugreport. And if the lines in the test-case marked "ICE" are commented out, then this is the output: $ g++-4.7 -std=c++11 ice.cpp ice.cpp:47:1: error: non-constant condition for static assertion ice.cpp:47:43: error: expression ‘b<10>’ does not designate a constexpr function ice.cpp:48:1: error: non-constant condition for static assertion ice.cpp:48:43: error: expression ‘b<10>’ does not designate a constexpr function ice.cpp:64:1: error: non-constant condition for static assertion ice.cpp:64:56: error: expression ‘0u’ does not designate a constexpr function ice.cpp:65:1: error: non-constant condition for static assertion ice.cpp:65:56: error: expression ‘0u’ does not designate a constexpr function ice.cpp:66:1: error: non-constant condition for static assertion ice.cpp:66:56: error: expression ‘0u’ does not designate a constexpr function ice.cpp:67:1: error: non-constant condition for static assertion ice.cpp:67:56: error: expression ‘0u’ does not designate a constexpr function ice.cpp:70:1: error: non-constant condition for static assertion ice.cpp:70:43: error: expression ‘C::c2’ does not designate a constexpr function ice.cpp:71:1: error: non-constant condition for static assertion ice.cpp:71:43: error: expression ‘C::c2’ does not designate a constexpr function The attached test-case compiles and runs successfully under clang with one small change as shown in this diff (this doesn't affect the test-case under gcc): --- ice.cpp +++ ice.cpp @@ -53,6 +53,7 @@ static_assert(Z_<int(*)(), &b<10>>::value() == 10, "oops"); // ICE constexpr struct C { + constexpr C() = default; constexpr int c1() const { return 10; } static constexpr int c2() { return 10; } } c;
next prev parent reply other threads:[~2012-05-04 16:22 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-02-16 15:56 [Bug c++/52282] New: " andyg1001 at hotmail dot co.uk 2012-02-16 19:41 ` [Bug c++/52282] " daniel.kruegler at googlemail dot com 2012-02-24 18:33 ` andyg1001 at hotmail dot co.uk 2012-05-04 16:22 ` andyg1001 at hotmail dot co.uk [this message] 2012-05-04 16:43 ` daniel.kruegler at googlemail dot com 2012-05-04 18:41 ` paolo.carlini at oracle dot com 2012-05-07 10:07 ` paolo.carlini at oracle dot com 2013-05-01 11:48 ` paolo.carlini at oracle dot com 2014-11-17 17:01 ` [Bug c++/52282] [C++0x] rejects-valid issues " jason at gcc dot gnu.org 2014-11-17 19:19 ` 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-52282-4-7lBPJkdeBC@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).