http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58633
Bug ID: 58633
Summary: [4.7/4.8/4.9 Regression] ICE with decltype of
destructor call
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 valid code snippet (compiled with "-std=c++0x") triggers an ICE
since GCC 4.7.0:
================================
void foo(int i)
{
typedef int I;
__decltype(i.I::~I())* p;
}
================================
bug.cc: In function 'void foo(int)':
bug.cc:4:22: internal compiler error: in cp_parser_abort_tentative_parse, at
cp/parser.c:24356
__decltype(i.I::~I())* p;
^
0x62fa03 cp_parser_abort_tentative_parse
../../gcc/gcc/cp/parser.c:24355
0x64270c cp_parser_decltype_expr
../../gcc/gcc/cp/parser.c:11708
0x64270c cp_parser_decltype
../../gcc/gcc/cp/parser.c:11791
0x65a192 cp_parser_simple_type_specifier
../../gcc/gcc/cp/parser.c:14298
0x637ea5 cp_parser_type_specifier
../../gcc/gcc/cp/parser.c:14168
0x64d739 cp_parser_decl_specifier_seq
../../gcc/gcc/cp/parser.c:11337
0x6517e9 cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:10927
0x653810 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:10876
0x654930 cp_parser_declaration_statement
../../gcc/gcc/cp/parser.c:10523
0x63d147 cp_parser_statement
../../gcc/gcc/cp/parser.c:9274
0x63e452 cp_parser_statement_seq_opt
../../gcc/gcc/cp/parser.c:9552
0x63e596 cp_parser_compound_statement
../../gcc/gcc/cp/parser.c:9506
0x64f95b cp_parser_function_body
../../gcc/gcc/cp/parser.c:18328
0x64f95b cp_parser_ctor_initializer_opt_and_function_body
../../gcc/gcc/cp/parser.c:18364
0x6509af cp_parser_function_definition_after_declarator
../../gcc/gcc/cp/parser.c:22351
0x6516d5 cp_parser_function_definition_from_specifiers_and_declarator
../../gcc/gcc/cp/parser.c:22272
0x6516d5 cp_parser_init_declarator
../../gcc/gcc/cp/parser.c:16357
0x65198f cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:10995
0x653810 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:10876
0x65c83e cp_parser_declaration
../../gcc/gcc/cp/parser.c:10773
Please submit a full bug report, [etc.]