This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/59629] New: [4.9 Regression] [c++11] ICE with invalid use of auto in lambda function
- 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: Mon, 30 Dec 2013 13:38:50 +0000
- Subject: [Bug c++/59629] New: [4.9 Regression] [c++11] ICE with invalid use of auto in lambda function
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59629
Bug ID: 59629
Summary: [4.9 Regression] [c++11] ICE with invalid use of auto
in lambda function
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 line (compiled with "-std=c++11")
triggers an ICE on trunk:
==============================================================
void foo(int i = []{ auto 0; }());
==============================================================
bug.cc: In lambda function:
bug.cc:1:20: internal compiler error: in synthesize_implicit_template_parm, at
cp/parser.c:31615
void foo(int i = []{ auto 0; }());
^
0x697e43 synthesize_implicit_template_parm
../../gcc/gcc/cp/parser.c:31615
0x697e43 cp_parser_simple_type_specifier
../../gcc/gcc/cp/parser.c:14499
0x677d95 cp_parser_type_specifier
../../gcc/gcc/cp/parser.c:14375
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
0x67a1b0 cp_parser_declaration_statement
../../gcc/gcc/cp/parser.c:10728
0x67a7fb cp_parser_statement
../../gcc/gcc/cp/parser.c:9462
0x67b5c9 cp_parser_statement_seq_opt
../../gcc/gcc/cp/parser.c:9740
0x67ccc0 cp_parser_lambda_body
../../gcc/gcc/cp/parser.c:9244
0x67ccc0 cp_parser_lambda_expression
../../gcc/gcc/cp/parser.c:8754
0x67ccc0 cp_parser_primary_expression
../../gcc/gcc/cp/parser.c:4309
0x67e5da cp_parser_postfix_expression
../../gcc/gcc/cp/parser.c:5969
0x681698 cp_parser_unary_expression
../../gcc/gcc/cp/parser.c:7170
0x68232f cp_parser_binary_expression
../../gcc/gcc/cp/parser.c:7874
0x682821 cp_parser_assignment_expression
../../gcc/gcc/cp/parser.c:8112
0x682ce5 cp_parser_assignment_expression
../../gcc/gcc/cp/parser.c:8162
0x682ce5 cp_parser_constant_expression
../../gcc/gcc/cp/parser.c:8372
0x684258 cp_parser_default_argument
../../gcc/gcc/cp/parser.c:18591
0x690f0e cp_parser_parameter_declaration
../../gcc/gcc/cp/parser.c:18517
Please submit a full bug report, [etc.]
Adam, this appeared right after your "auto refactoring" patch
2013-11-12 Adam Butcher <adam@jessamine.co.uk>
PR c++/58534
PR c++/58536
PR c++/58548
PR c++/58549
PR c++/58637
* parser.h (struct cp_parser): New members implicit_template_parms,
implicit_template_scope and auto_is_implicit_function_template_parm_p.
* parser.c (add_implicit_template_parms): Refactor as ...
(synthesize_implicit_template_parm): ... this to append a new template
type parm to the current template parameter list (introducing a new list
if necessary). Removed push_deferring_access_checks.
[...]
Would you mind having a look?