[Bug c++/60626] New: [c++1y] ICE with pointer to function with auto parameter
reichelt at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Mar 23 19:35:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60626
Bug ID: 60626
Summary: [c++1y] ICE with pointer to function with auto
parameter
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
CC: abutcher at gcc dot gnu.org
The following invalid code snippet (compiled with "-std=c++1y")
triggers an ICE on trunk:
==================================
struct A {};
void (*A::p)(auto) = 0;
==================================
bug.cc:3:18: error: 'void (* A::p)(auto:1)' is not a static member of 'struct
A'
void (*A::p)(auto) = 0;
^
bug.cc:3:18: error: template definition of non-template 'void (* A::p)(auto:1)'
bug.cc:3:22: internal compiler error: in poplevel, at cp/decl.c:568
void (*A::p)(auto) = 0;
^
0x5c3903 poplevel(int, int, int)
../../gcc/gcc/cp/decl.c:568
0x5fd2a8 end_template_decl()
../../gcc/gcc/cp/pt.c:3809
0x6a1f31 finish_fully_implicit_template
../../gcc/gcc/cp/parser.c:32121
0x6cd346 cp_parser_init_declarator
../../gcc/gcc/cp/parser.c:16826
0x6ce9e9 cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:11225
0x6b2983 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:11106
0x6d9022 cp_parser_declaration
../../gcc/gcc/cp/parser.c:11003
0x6d7d18 cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:10889
0x6d95ca cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:4030
0x6d95ca c_parse_file()
../../gcc/gcc/cp/parser.c:31645
0x7f9de3 c_common_parse_file()
../../gcc/gcc/c-family/c-opts.c:1061
Please submit a full bug report, [etc.]
Adam, you might want to have a look at this one.
More information about the Gcc-bugs
mailing list