public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59636] New: [c++1y] ICE with missing template parameter in lambda
@ 2013-12-30 17:34 reichelt at gcc dot gnu.org
2013-12-30 17:35 ` [Bug c++/59636] " reichelt at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-12-30 17:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59636
Bug ID: 59636
Summary: [c++1y] ICE with missing template parameter in lambda
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++1y") triggers an
ICE on trunk:
===========================================
auto i = []() { return []<>() {}; };
===========================================
bug.cc: In lambda function:
bug.cc:1:26: internal compiler error: Segmentation fault
auto i = []() { return []<>() {}; };
^
0xb75baf crash_signal
../../gcc/gcc/toplev.c:336
0x6916ef cp_parser_template_parameter
../../gcc/gcc/cp/parser.c:13055
0x6916ef cp_parser_template_parameter_list
../../gcc/gcc/cp/parser.c:12882
0x67d322 cp_parser_lambda_declarator_opt
../../gcc/gcc/cp/parser.c:9027
0x67d322 cp_parser_lambda_expression
../../gcc/gcc/cp/parser.c:8751
0x67d322 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
0x6847b4 cp_parser_expression
../../gcc/gcc/cp/parser.c:8274
0x67dce1 cp_parser_expression
../../gcc/gcc/cp/parser.c:8313
0x67dce1 cp_parser_lambda_body
../../gcc/gcc/cp/parser.c:9223
0x67dce1 cp_parser_lambda_expression
../../gcc/gcc/cp/parser.c:8754
0x67dce1 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
Please submit a full bug report, [etc.]
Maybe the compiler chokes on the fact that there are more braces, brackets
and parentheses than letters in the code ;-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/59636] [c++1y] ICE with missing template parameter in lambda
2013-12-30 17:34 [Bug c++/59636] New: [c++1y] ICE with missing template parameter in lambda reichelt at gcc dot gnu.org
@ 2013-12-30 17:35 ` reichelt at gcc dot gnu.org
2014-01-06 18:22 ` abutcher at gcc dot gnu.org
2014-01-06 21:21 ` reichelt at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-12-30 17:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59636
Volker Reichelt <reichelt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-invalid-code
CC| |abutcher at gcc dot gnu.org
Known to fail| |4.9.0
--- Comment #1 from Volker Reichelt <reichelt at gcc dot gnu.org> ---
Adam, this looks like your domain. Would you mind having a look?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/59636] [c++1y] ICE with missing template parameter in lambda
2013-12-30 17:34 [Bug c++/59636] New: [c++1y] ICE with missing template parameter in lambda reichelt at gcc dot gnu.org
2013-12-30 17:35 ` [Bug c++/59636] " reichelt at gcc dot gnu.org
@ 2014-01-06 18:22 ` abutcher at gcc dot gnu.org
2014-01-06 21:21 ` reichelt at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: abutcher at gcc dot gnu.org @ 2014-01-06 18:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59636
--- Comment #2 from Adam Butcher <abutcher at gcc dot gnu.org> ---
Author: abutcher
Date: Mon Jan 6 18:22:29 2014
New Revision: 206369
URL: http://gcc.gnu.org/viewcvs?rev=206369&root=gcc&view=rev
Log:
Fix PR c++/59636
PR c++/59636
* cp/parser.c (cp_parser_template_parameter): Early out with
error_mark_node if parameter declaration was not parsed.
* g++.dg/cpp1y/pr59636.C: New testcase.
Added:
trunk/gcc/testsuite/g++.dg/cpp1y/pr59636.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/59636] [c++1y] ICE with missing template parameter in lambda
2013-12-30 17:34 [Bug c++/59636] New: [c++1y] ICE with missing template parameter in lambda reichelt at gcc dot gnu.org
2013-12-30 17:35 ` [Bug c++/59636] " reichelt at gcc dot gnu.org
2014-01-06 18:22 ` abutcher at gcc dot gnu.org
@ 2014-01-06 21:21 ` reichelt at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-01-06 21:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59636
Volker Reichelt <reichelt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |4.9.0
--- Comment #3 from Volker Reichelt <reichelt at gcc dot gnu.org> ---
Fixed for GCC 4.9.0 by Adam's patch.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-01-06 21:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-30 17:34 [Bug c++/59636] New: [c++1y] ICE with missing template parameter in lambda reichelt at gcc dot gnu.org
2013-12-30 17:35 ` [Bug c++/59636] " reichelt at gcc dot gnu.org
2014-01-06 18:22 ` abutcher at gcc dot gnu.org
2014-01-06 21:21 ` reichelt at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).