public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109300] New: [13 Regression] ICE in cp_finish_decl, at cp/decl.cc:8279
@ 2023-03-27 18:36 gscfq@t-online.de
2023-03-27 19:00 ` [Bug c++/109300] " pinskia at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: gscfq@t-online.de @ 2023-03-27 18:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109300
Bug ID: 109300
Summary: [13 Regression] ICE in cp_finish_decl, at
cp/decl.cc:8279
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: gscfq@t-online.de
Target Milestone: ---
Started between 20230226 and 20230312 :
$ cat z1.cc
template<typename T>
auto x = [](){ x<int>(); };
$ gcc-13-20230326 -c z1.cc
z1.cc: In instantiation of 'auto x<int>':
z1.cc:2:16: required from here
z1.cc:2:6: internal compiler error: in cp_finish_decl, at cp/decl.cc:8279
2 | auto x = [](){ x<int>(); };
| ^
0x7a8893 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
../../gcc/cp/decl.cc:8279
0x899b2a instantiate_body
../../gcc/cp/pt.cc:26799
0x89aa6f instantiate_decl(tree_node*, bool, bool)
../../gcc/cp/pt.cc:27121
0x7b210a maybe_instantiate_decl(tree_node*)
../../gcc/cp/decl2.cc:5448
0x7b2c62 mark_used(tree_node*, int)
../../gcc/cp/decl2.cc:5747
0x8cc5c3 finish_id_expression_1
../../gcc/cp/semantics.cc:4269
0x8cc5c3 finish_id_expression(tree_node*, tree_node*, tree_node*, cp_id_kind*,
bool, bool, bool*, bool, bool, bool, bool, char const**, unsigned int)
../../gcc/cp/semantics.cc:4411
0x853ecf cp_parser_primary_expression
../../gcc/cp/parser.cc:6149
0x856e76 cp_parser_postfix_expression
../../gcc/cp/parser.cc:7777
0x86a60f cp_parser_unary_expression
../../gcc/cp/parser.cc:9141
0x83e79f cp_parser_cast_expression
../../gcc/cp/parser.cc:10045
0x83f07f cp_parser_binary_expression
../../gcc/cp/parser.cc:10147
0x83fa74 cp_parser_assignment_expression
../../gcc/cp/parser.cc:10490
0x8411b2 cp_parser_expression
../../gcc/cp/parser.cc:10660
0x844837 cp_parser_expression_statement
../../gcc/cp/parser.cc:12816
0x851cbc cp_parser_statement
../../gcc/cp/parser.cc:12596
0x852d54 cp_parser_statement_seq_opt
../../gcc/cp/parser.cc:12967
0x852e0f cp_parser_compound_statement
../../gcc/cp/parser.cc:12919
0x853967 cp_parser_function_body
../../gcc/cp/parser.cc:25335
0x853967 cp_parser_lambda_body
../../gcc/cp/parser.cc:11837
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/109300] [13 Regression] ICE in cp_finish_decl, at cp/decl.cc:8279
2023-03-27 18:36 [Bug c++/109300] New: [13 Regression] ICE in cp_finish_decl, at cp/decl.cc:8279 gscfq@t-online.de
@ 2023-03-27 19:00 ` pinskia at gcc dot gnu.org
2023-03-27 20:46 ` [Bug c++/109300] [13 Regression] ICE in cp_finish_decl, at cp/decl.cc:8279 since r13-6380-gd3d205ab44088616 marxin at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-03-27 19:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109300
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2023-03-27
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Keywords|ice-on-valid-code |ice-on-invalid-code,
| |needs-bisection
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note I think this is invalid code.
With an instantation, GCC 12 (and before) does reject it:
```
template<typename T>
auto x = [](){ x<int>(); };
auto y = x<int>;
```
```
<source>: In instantiation of 'auto x<int>':
<source>:3:10: required from here
<source>:2:16: error: use of 'x<int>' before deduction of 'auto'
2 | auto x = [](){ x<int>(); };
| ^~~~~~
<source>:2:6: error: 'x<int>' has incomplete type
2 | auto x = [](){ x<int>(); };
| ^
<source>:2:22: error: invalid use of 'auto'
2 | auto x = [](){ x<int>(); };
| ~~~~~~^~
```
Note clang rejects it even without an instantation.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/109300] [13 Regression] ICE in cp_finish_decl, at cp/decl.cc:8279 since r13-6380-gd3d205ab44088616
2023-03-27 18:36 [Bug c++/109300] New: [13 Regression] ICE in cp_finish_decl, at cp/decl.cc:8279 gscfq@t-online.de
2023-03-27 19:00 ` [Bug c++/109300] " pinskia at gcc dot gnu.org
@ 2023-03-27 20:46 ` marxin at gcc dot gnu.org
2023-03-27 20:48 ` mpolacek at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2023-03-27 20:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109300
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org,
| |ppalka at gcc dot gnu.org
Keywords|needs-bisection |
Summary|[13 Regression] ICE in |[13 Regression] ICE in
|cp_finish_decl, at |cp_finish_decl, at
|cp/decl.cc:8279 |cp/decl.cc:8279 since
| |r13-6380-gd3d205ab44088616
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r13-6380-gd3d205ab44088616.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/109300] [13 Regression] ICE in cp_finish_decl, at cp/decl.cc:8279 since r13-6380-gd3d205ab44088616
2023-03-27 18:36 [Bug c++/109300] New: [13 Regression] ICE in cp_finish_decl, at cp/decl.cc:8279 gscfq@t-online.de
2023-03-27 19:00 ` [Bug c++/109300] " pinskia at gcc dot gnu.org
2023-03-27 20:46 ` [Bug c++/109300] [13 Regression] ICE in cp_finish_decl, at cp/decl.cc:8279 since r13-6380-gd3d205ab44088616 marxin at gcc dot gnu.org
@ 2023-03-27 20:48 ` mpolacek at gcc dot gnu.org
2023-03-27 23:45 ` ppalka at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-03-27 20:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109300
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
Target Milestone|--- |13.0
CC| |mpolacek at gcc dot gnu.org
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/109300] [13 Regression] ICE in cp_finish_decl, at cp/decl.cc:8279 since r13-6380-gd3d205ab44088616
2023-03-27 18:36 [Bug c++/109300] New: [13 Regression] ICE in cp_finish_decl, at cp/decl.cc:8279 gscfq@t-online.de
` (2 preceding siblings ...)
2023-03-27 20:48 ` mpolacek at gcc dot gnu.org
@ 2023-03-27 23:45 ` ppalka at gcc dot gnu.org
2023-03-28 7:11 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: ppalka at gcc dot gnu.org @ 2023-03-27 23:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109300
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org
Status|NEW |ASSIGNED
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/109300] [13 Regression] ICE in cp_finish_decl, at cp/decl.cc:8279 since r13-6380-gd3d205ab44088616
2023-03-27 18:36 [Bug c++/109300] New: [13 Regression] ICE in cp_finish_decl, at cp/decl.cc:8279 gscfq@t-online.de
` (3 preceding siblings ...)
2023-03-27 23:45 ` ppalka at gcc dot gnu.org
@ 2023-03-28 7:11 ` rguenth at gcc dot gnu.org
2023-04-03 22:50 ` cvs-commit at gcc dot gnu.org
2023-04-03 22:51 ` ppalka at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-03-28 7:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109300
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P2 |P1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/109300] [13 Regression] ICE in cp_finish_decl, at cp/decl.cc:8279 since r13-6380-gd3d205ab44088616
2023-03-27 18:36 [Bug c++/109300] New: [13 Regression] ICE in cp_finish_decl, at cp/decl.cc:8279 gscfq@t-online.de
` (4 preceding siblings ...)
2023-03-28 7:11 ` rguenth at gcc dot gnu.org
@ 2023-04-03 22:50 ` cvs-commit at gcc dot gnu.org
2023-04-03 22:51 ` ppalka at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-04-03 22:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109300
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:c37ed38ada788ae410c48ec6d8c9b5d9f32ab8cf
commit r13-6989-gc37ed38ada788ae410c48ec6d8c9b5d9f32ab8cf
Author: Patrick Palka <ppalka@redhat.com>
Date: Mon Apr 3 18:49:37 2023 -0400
c++: ICE with loopy var tmpl auto deduction [PR109300]
Now that we resolve non-dependent variable template-ids ahead of time,
cp_finish_decl needs to handle a new invalid situation: we can end up
trying to instantiate a variable template with deduced type before we
fully parsed its initializer.
PR c++/109300
gcc/cp/ChangeLog:
* decl.cc (cp_finish_decl): Diagnose ordinary auto deduction
with no initializer, instead of asserting.
gcc/testsuite/ChangeLog:
* g++.dg/cpp1y/var-templ79.C: New test.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/109300] [13 Regression] ICE in cp_finish_decl, at cp/decl.cc:8279 since r13-6380-gd3d205ab44088616
2023-03-27 18:36 [Bug c++/109300] New: [13 Regression] ICE in cp_finish_decl, at cp/decl.cc:8279 gscfq@t-online.de
` (5 preceding siblings ...)
2023-04-03 22:50 ` cvs-commit at gcc dot gnu.org
@ 2023-04-03 22:51 ` ppalka at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: ppalka at gcc dot gnu.org @ 2023-04-03 22:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109300
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #4 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-04-03 22:51 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-27 18:36 [Bug c++/109300] New: [13 Regression] ICE in cp_finish_decl, at cp/decl.cc:8279 gscfq@t-online.de
2023-03-27 19:00 ` [Bug c++/109300] " pinskia at gcc dot gnu.org
2023-03-27 20:46 ` [Bug c++/109300] [13 Regression] ICE in cp_finish_decl, at cp/decl.cc:8279 since r13-6380-gd3d205ab44088616 marxin at gcc dot gnu.org
2023-03-27 20:48 ` mpolacek at gcc dot gnu.org
2023-03-27 23:45 ` ppalka at gcc dot gnu.org
2023-03-28 7:11 ` rguenth at gcc dot gnu.org
2023-04-03 22:50 ` cvs-commit at gcc dot gnu.org
2023-04-03 22:51 ` ppalka 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).