From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26692 invoked by alias); 1 Nov 2013 19:45:08 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 26658 invoked by uid 48); 1 Nov 2013 19:45:05 -0000 From: "reichelt at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/58966] New: [4.9 Regression] [c++11] ICE with wrong usage of constexpr Date: Fri, 01 Nov 2013 19:45:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: reichelt at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-11/txt/msg00064.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58966 Bug ID: 58966 Summary: [4.9 Regression] [c++11] ICE with wrong usage of 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: =========================== struct A { constexpr int i; }; constexpr A a[] = {}; =========================== bug.cc:3:17: error: non-static data member 'i' declared 'constexpr' constexpr int i; ^ bug.cc:6:20: internal compiler error: in cxx_eval_bare_aggregate, at cp/semantics.c:8840 constexpr A a[] = {}; ^ 0x6ddbe9 cxx_eval_bare_aggregate ../../gcc/gcc/cp/semantics.c:8840 0x6ddbe9 cxx_eval_constant_expression ../../gcc/gcc/cp/semantics.c:9620 0x6df206 cxx_eval_outermost_constant_expr ../../gcc/gcc/cp/semantics.c:9727 0x5ee9b3 store_init_value(tree_node*, tree_node*, vec**, int) ../../gcc/gcc/cp/typeck2.c:786 0x5639d6 check_initializer ../../gcc/gcc/cp/decl.c:5737 0x57686d cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) ../../gcc/gcc/cp/decl.c:6356 0x663bd1 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16650 0x66533f cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:11064 0x6492e0 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10945 0x6705e7 cp_parser_declaration ../../gcc/gcc/cp/parser.c:10842 0x66f308 cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10728 0x670c46 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3990 0x670c46 c_parse_file() ../../gcc/gcc/cp/parser.c:31002 0x791113 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.] The regression was introduced between 4.9.0 20131023 and 4.9.0 20131025.