From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11670 invoked by alias); 1 Mar 2014 23:08:43 -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 11654 invoked by uid 48); 1 Mar 2014 23:08:39 -0000 From: "reichelt at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/60384] New: [4.9 Regression] [c++1y] ICE with invalid typedef Date: Sat, 01 Mar 2014 23:08: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: error-recovery, ice-on-invalid-code 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 keywords 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: 2014-03/txt/msg00062.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60384 Bug ID: 60384 Summary: [4.9 Regression] [c++1y] ICE with invalid typedef Product: gcc Version: 4.9.0 Status: UNCONFIRMED Keywords: error-recovery, ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid testcase (compiled with "-std=c++1y") triggers an ICE on trunk: ================================ template int foo(); struct A { typedef auto foo<>(); }; ================================ bug.cc:5:22: error: typedef declared 'auto' typedef auto foo<>(); ^ bug.cc:5:22: internal compiler error: tree check: expected identifier_node, have template_id_expr in push_class_level_binding_1, at cp/name-lookup.c:3172 0xdc0f54 tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc/gcc/tree.c:9192 0x784196 tree_check ../../gcc/gcc/tree.h:2709 0x784196 push_class_level_binding_1 ../../gcc/gcc/cp/name-lookup.c:3172 0x784196 push_class_level_binding(tree_node*, tree_node*) ../../gcc/gcc/cp/name-lookup.c:3281 0x784339 pushdecl_class_level(tree_node*) ../../gcc/gcc/cp/name-lookup.c:3013 0x7345bf finish_member_declaration(tree_node*) ../../gcc/gcc/cp/semantics.c:2870 0x6ac95f cp_parser_member_declaration ../../gcc/gcc/cp/parser.c:20531 0x6afa84 cp_parser_member_specification_opt ../../gcc/gcc/cp/parser.c:20029 0x6afa84 cp_parser_class_specifier_1 ../../gcc/gcc/cp/parser.c:19263 0x6afa84 cp_parser_class_specifier ../../gcc/gcc/cp/parser.c:19490 0x6afa84 cp_parser_type_specifier ../../gcc/gcc/cp/parser.c:14305 0x6c8fb0 cp_parser_decl_specifier_seq ../../gcc/gcc/cp/parser.c:11547 0x6cfb69 cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:11137 0x6b3003 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:11086 0x6da2d2 cp_parser_declaration ../../gcc/gcc/cp/parser.c:10983 0x6d8fc8 cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10869 0x6da87a cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:4014 0x6da87a c_parse_file() ../../gcc/gcc/cp/parser.c:31590 0x7fa103 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1060 Please submit a full bug report, [etc.]