public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/115331] New: [15 regression] ICE-on-invalid passing a typoed lambda to a list-initializer
@ 2024-06-03 15:25 blubban at gmail dot com
2024-06-03 15:28 ` [Bug c++/115331] " pinskia at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: blubban at gmail dot com @ 2024-06-03 15:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115331
Bug ID: 115331
Summary: [15 regression] ICE-on-invalid passing a typoed lambda
to a list-initializer
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
struct has_ctor
{
has_ctor(auto arg) {}
};
void aaa()
{
has_ctor{[]<(){}}; // typo intentional
}
-std=c++20
<source>: In function 'void aaa()':
<source>:8:17: error: expected identifier before '(' token
8 | has_ctor{[]<(){}};
| ^
<source>:8:19: error: expected '>' before '{' token
8 | has_ctor{[]<(){}};
| ^
<source>: In instantiation of 'has_ctor::has_ctor(auto:1) [with auto:1 =
aaa()::<lambda()>]':
<source>:3:5: required from here
3 | has_ctor(auto arg) {}
| ^~~~~~~~
<source>:3:5: internal compiler error: tree check: expected tree that contains
'decl common' structure, have 'error_mark' in decl_template_parm_check, at
cp/cp-tree.h:5138
0x269996c internal_error(char const*, ...)
???:0
0x96eb0f tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
???:0
0xba20c6 mangle_decl(tree_node*)
???:0
0x16c5fc5 decl_assembler_name(tree_node*)
???:0
0x16eea01 assign_assembler_name_if_needed(tree_node*)
???:0
0xe8c11d cgraph_node::analyze()
???:0
0xe8f6d1 symbol_table::finalize_compilation_unit()
???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Compiler returned: 1
Online reproducer: https://godbolt.org/z/K1hjEsaf5
The ICE does not reproduce on 14.1, it's trunk only (tested on
Compiler-Explorer-Build-gcc-cbf2ed4b309d54039d74be5d730299012e7681b3-binutils-2.42,
15.0.0 20240603).
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/115331] ICE-on-invalid passing a typoed lambda to a list-initializer
2024-06-03 15:25 [Bug c++/115331] New: [15 regression] ICE-on-invalid passing a typoed lambda to a list-initializer blubban at gmail dot com
@ 2024-06-03 15:28 ` pinskia at gcc dot gnu.org
2024-06-03 15:34 ` [Bug c++/115331] [13/14/15 Regression] " pinskia at gcc dot gnu.org
2024-06-04 7:17 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-03 15:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115331
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[15 regression] |ICE-on-invalid passing a
|ICE-on-invalid passing a |typoed lambda to a
|typoed lambda to a |list-initializer
|list-initializer |
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>The ICE does not reproduce on 14.1, it's trunk only
That is most likely because the trunk has checking turned on by default. So
removing the regression marker until proven otherwise.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/115331] [13/14/15 Regression] ICE-on-invalid passing a typoed lambda to a list-initializer
2024-06-03 15:25 [Bug c++/115331] New: [15 regression] ICE-on-invalid passing a typoed lambda to a list-initializer blubban at gmail dot com
2024-06-03 15:28 ` [Bug c++/115331] " pinskia at gcc dot gnu.org
@ 2024-06-03 15:34 ` pinskia at gcc dot gnu.org
2024-06-04 7:17 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-03 15:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115331
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2024-06-03
Summary|ICE-on-invalid passing a |[13/14/15 Regression]
|typoed lambda to a |ICE-on-invalid passing a
|list-initializer |typoed lambda to a
| |list-initializer
Target Milestone|--- |13.4
Status|UNCONFIRMED |NEW
Keywords| |error-recovery,
| |ice-checking
Ever confirmed|0 |1
Version|unknown |15.0
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I suspect it was r13-3527-gf7d1d7777bb86a .
+ if (parm == error_mark_node)
+ continue;
+ parm = TREE_VALUE (parm);
+
+ if (DECL_VIRTUAL_P (parm))
+ // A synthetic parm, we're done.
+ break;
The check for parm being error_mark_node should also happen on TREE_VALUE
(param).
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/115331] [13/14/15 Regression] ICE-on-invalid passing a typoed lambda to a list-initializer
2024-06-03 15:25 [Bug c++/115331] New: [15 regression] ICE-on-invalid passing a typoed lambda to a list-initializer blubban at gmail dot com
2024-06-03 15:28 ` [Bug c++/115331] " pinskia at gcc dot gnu.org
2024-06-03 15:34 ` [Bug c++/115331] [13/14/15 Regression] " pinskia at gcc dot gnu.org
@ 2024-06-04 7:17 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-06-04 7:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115331
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-06-04 7:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-03 15:25 [Bug c++/115331] New: [15 regression] ICE-on-invalid passing a typoed lambda to a list-initializer blubban at gmail dot com
2024-06-03 15:28 ` [Bug c++/115331] " pinskia at gcc dot gnu.org
2024-06-03 15:34 ` [Bug c++/115331] [13/14/15 Regression] " pinskia at gcc dot gnu.org
2024-06-04 7:17 ` rguenth 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).