public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101878] New: ICE with invalid lambda definition
@ 2021-08-12 13:41 reichelt at gcc dot gnu.org
2021-08-12 15:03 ` [Bug c++/101878] " pinskia at gcc dot gnu.org
2021-08-12 15:05 ` pinskia at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: reichelt at gcc dot gnu.org @ 2021-08-12 13:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101878
Bug ID: 101878
Summary: ICE with invalid lambda definition
Product: gcc
Version: 12.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
Target Milestone: ---
The following invalid code snippet triggers an ICE since GCC 4.9.0
(where generic lambdas were introduced):
===========================
void foo()
{
[](auto) [ []{}; ];
}
===========================
bug.cc: In function 'void foo()':
bug.cc:3:16: error: expected ']' before '{' token
3 | [](auto) [ []{}; ];
| ^
| ]
bug.cc:3:17: internal compiler error: in dependent_type_p, at cp/pt.c:26774
3 | [](auto) [ []{}; ];
| ^
0x6e03a4 dependent_type_p(tree_node*)
../../gcc/gcc/cp/pt.c:26774
0x9b9fcf require_complete_types_for_parms
../../gcc/gcc/cp/decl.c:14232
0x9b9fcf check_function_type
../../gcc/gcc/cp/decl.c:16449
0x9b9fcf start_preparsed_function(tree_node*, tree_node*, int)
../../gcc/gcc/cp/decl.c:16648
0xa17325 start_lambda_function(tree_node*, tree_node*)
../../gcc/gcc/cp/lambda.c:1428
0xaa4ad9 cp_parser_lambda_body
../../gcc/gcc/cp/parser.c:11637
0xaa4ad9 cp_parser_lambda_expression
../../gcc/gcc/cp/parser.c:10965
0xaa5593 cp_parser_primary_expression
../../gcc/gcc/cp/parser.c:5666
0xaa82ed cp_parser_postfix_expression
../../gcc/gcc/cp/parser.c:7563
0xa91a2a cp_parser_binary_expression
../../gcc/gcc/cp/parser.c:9893
0xa9233c cp_parser_assignment_expression
../../gcc/gcc/cp/parser.c:10197
0xa938b2 cp_parser_expression
../../gcc/gcc/cp/parser.c:10367
0xa96f58 cp_parser_expression_statement
../../gcc/gcc/cp/parser.c:12531
0xaa2dff cp_parser_statement
../../gcc/gcc/cp/parser.c:12327
0xaa3e9d cp_parser_statement_seq_opt
../../gcc/gcc/cp/parser.c:12679
0xaa3f78 cp_parser_compound_statement
../../gcc/gcc/cp/parser.c:12628
0xac35c0 cp_parser_function_body
../../gcc/gcc/cp/parser.c:24762
0xac35c0 cp_parser_ctor_initializer_opt_and_function_body
../../gcc/gcc/cp/parser.c:24813
0xac428a cp_parser_function_definition_after_declarator
../../gcc/gcc/cp/parser.c:30898
0xac56c4 cp_parser_function_definition_from_specifiers_and_declarator
../../gcc/gcc/cp/parser.c:30814
Please submit a full bug report, [etc.]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/101878] ICE with invalid lambda definition
2021-08-12 13:41 [Bug c++/101878] New: ICE with invalid lambda definition reichelt at gcc dot gnu.org
@ 2021-08-12 15:03 ` pinskia at gcc dot gnu.org
2021-08-12 15:05 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-12 15:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101878
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2021-08-12
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/101878] ICE with invalid lambda definition
2021-08-12 13:41 [Bug c++/101878] New: ICE with invalid lambda definition reichelt at gcc dot gnu.org
2021-08-12 15:03 ` [Bug c++/101878] " pinskia at gcc dot gnu.org
@ 2021-08-12 15:05 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-12 15:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101878
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is definitely a dup of bug 95931. I am not all 100% sure PR 95931 is a
dup of bug 96097 but that is just me.
*** This bug has been marked as a duplicate of bug 95931 ***
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-12 15:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-12 13:41 [Bug c++/101878] New: ICE with invalid lambda definition reichelt at gcc dot gnu.org
2021-08-12 15:03 ` [Bug c++/101878] " pinskia at gcc dot gnu.org
2021-08-12 15:05 ` pinskia 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).