[Bug c++/60384] New: [4.9 Regression] [c++1y] ICE with invalid typedef
reichelt at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Mar 1 23:08:00 GMT 2014
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<typename> 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.]
More information about the Gcc-bugs
mailing list