From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13418 invoked by alias); 2 Oct 2013 20:18:17 -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 13385 invoked by uid 48); 2 Oct 2013 20:18:14 -0000 From: "reichelt at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/58596] New: [4.8/4.9 Regression] [c++11] ICE with decltype in non-static data member initializer Date: Wed, 02 Oct 2013 20:18: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-10/txt/msg00125.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58596 Bug ID: 58596 Summary: [4.8/4.9 Regression] [c++11] ICE with decltype in non-static data member initializer 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 code snippet (compiled with "-std=c++11") triggers an ICE since GCC 4.8.0: ============================================== struct A { int i = [] { return decltype(i)(); }(); }; ============================================== bug.cc: In lambda function: bug.cc:3:32: internal compiler error: Segmentation fault int i = [] { return decltype(i)(); }(); ^ 0xaef4bf crash_signal ../../gcc/gcc/toplev.c:335 0x54c0cd contains_struct_check ../../gcc/gcc/tree.h:2722 0x54c0cd build_new_op_1 ../../gcc/gcc/cp/call.c:5154 0x54cf47 build_new_op(unsigned int, tree_code, int, tree_node*, tree_node*, tree_node*, tree_node**, int) ../../gcc/gcc/cp/call.c:5513 0x672529 build_x_indirect_ref(unsigned int, tree_node*, ref_operator, int) ../../gcc/gcc/cp/typeck.c:2866 0x6b165a finish_non_static_data_member(tree_node*, tree_node*, tree_node*) ../../gcc/gcc/cp/semantics.c:1580 0x6b6b5f finish_id_expression(tree_node*, tree_node*, tree_node*, cp_id_kind*, bool, bool, bool*, bool, bool, bool, bool, char const**, unsigned int) ../../gcc/gcc/cp/semantics.c:3418 0x642cfb cp_parser_decltype_expr ../../gcc/gcc/cp/parser.c:11653 0x642cfb cp_parser_decltype ../../gcc/gcc/cp/parser.c:11781 0x65a862 cp_parser_simple_type_specifier ../../gcc/gcc/cp/parser.c:14288 0x641fe4 cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:5737 0x64483d cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:7009 0x64540f cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:7701 0x6458cf cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:7937 0x647733 cp_parser_expression ../../gcc/gcc/cp/parser.c:8099 0x641125 cp_parser_expression ../../gcc/gcc/cp/parser.c:8138 0x641125 cp_parser_lambda_body ../../gcc/gcc/cp/parser.c:9035 0x641125 cp_parser_lambda_expression ../../gcc/gcc/cp/parser.c:8574 0x641125 cp_parser_primary_expression ../../gcc/gcc/cp/parser.c:4230 0x642050 cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:5814 Please submit a full bug report, [etc.]