[Bug c++/59638] New: [c++1y] ICE with pointer to function that has auto as parameter
reichelt at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Dec 30 18:25:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59638
Bug ID: 59638
Summary: [c++1y] ICE with pointer to function that has auto as
parameter
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++1y")
triggers an ICE on trunk:
===========================================
typedef void (*f)(auto);
struct A
{
int i;
};
===========================================
bug.cc:1:23: error: template declaration of 'typedef void (* f)(auto:1)'
typedef void (*f)(auto);
^
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
0x58b398 poplevel(int, int, int)
../../gcc/gcc/cp/decl.c:568
0x5c5498 end_template_decl()
../../gcc/gcc/cp/pt.c:3799
0x6697a1 finish_fully_implicit_template
../../gcc/gcc/cp/parser.c:31759
0x6727a3 cp_parser_member_declaration
../../gcc/gcc/cp/parser.c:20390
0x6759ec cp_parser_member_specification_opt
../../gcc/gcc/cp/parser.c:19935
0x6759ec cp_parser_class_specifier_1
../../gcc/gcc/cp/parser.c:19179
0x6759ec cp_parser_class_specifier
../../gcc/gcc/cp/parser.c:19406
0x6759ec cp_parser_type_specifier
../../gcc/gcc/cp/parser.c:14297
0x68e8cf cp_parser_decl_specifier_seq
../../gcc/gcc/cp/parser.c:11542
0x695459 cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:11132
0x679003 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:11081
0x69fcd3 cp_parser_declaration
../../gcc/gcc/cp/parser.c:10978
0x69e9c8 cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:10864
0x6a02ba cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:4018
0x6a02ba c_parse_file()
../../gcc/gcc/cp/parser.c:31331
0x7c30f3 c_common_parse_file()
../../gcc/gcc/c-family/c-opts.c:1060
Please submit a full bug report, [etc.]
Already the second error message is bogus, because i is not a template:
> bug.cc:5:7: error: data member 'i' cannot be a member template
More information about the Gcc-bugs
mailing list