This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/60377] New: [c++1y] ICE with invalid function parameter in conjunction with auto parameter
- From: "reichelt at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 01 Mar 2014 00:51:13 +0000
- Subject: [Bug c++/60377] New: [c++1y] ICE with invalid function parameter in conjunction with auto parameter
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60377
Bug ID: 60377
Summary: [c++1y] ICE with invalid function parameter in
conjunction with auto parameter
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Keywords: diagnostic, 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:
====================================
void foo(auto, void (f*)());
struct A
{
int i;
};
====================================
bug.cc:1:23: error: expected ')' before '*' token
void foo(auto, void (f*)());
^
bug.cc:1:23: error: expected ')' before '*' token
bug.cc:1:23: error: expected initializer before '*' token
bug.cc:5:7: error: data member 'i' cannot be a member template
int i;
^
bug.cc:5:7: internal compiler error: in poplevel, at cp/decl.c:568
0x5c54a3 poplevel(int, int, int)
../../gcc/gcc/cp/decl.c:568
0x5feba8 end_template_decl()
../../gcc/gcc/cp/pt.c:3807
0x6a3951 finish_fully_implicit_template
../../gcc/gcc/cp/parser.c:32047
0x6acb0c cp_parser_member_declaration
../../gcc/gcc/cp/parser.c:20482
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
0x7f9fe3 c_common_parse_file()
../../gcc/gcc/c-family/c-opts.c:1060
Please submit a full bug report, [etc.]
Note that the error message in line 5 is bogus.
Adam, would you mind having a look?