public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/106351] New: ICE in fold expression involving templatized lambda
@ 2022-07-19 7:31 amir.ahmed.ansari at outlook dot com
2022-07-19 10:19 ` [Bug c++/106351] " marxin at gcc dot gnu.org
2022-08-09 7:09 ` pinskia at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: amir.ahmed.ansari at outlook dot com @ 2022-07-19 7:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106351
Bug ID: 106351
Summary: ICE in fold expression involving templatized lambda
Product: gcc
Version: 12.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: amir.ahmed.ansari at outlook dot com
Target Milestone: ---
The following code:
template <typename ...Args>
struct C
{
void f()
{
(
[&, this]<typename Arg>()
{
}.operator()<Args>(),
...
);
}
};
int main()
{
C<int>{}.f();
return 0;
}
produces:
<source>: In instantiation of 'void C<Args>::f() [with Args = {int}]':
<source>:17:15: required from here
<source>:9:30: internal compiler error: in lookup_template_class_1, at
cp/pt.cc:10114
7 | [&, this]<typename Arg>()
| ~~~~~~~~~~~~~~~~~~~~~~~~~
8 | {
| ~
9 | }.operator()<Args>(),
| ~~~~~~~~~~~~~~~~~^
0x1ba65f9 internal_error(char const*, ...)
???:0
0x6fad32 fancy_abort(char const*, int, char const*)
???:0
0x87f6fd lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
???:0
0x875d31 tsubst(tree_node*, tree_node*, int, tree_node*)
???:0
0x881224 tsubst_pack_expansion(tree_node*, tree_node*, int, tree_node*)
???:0
0x878889 instantiate_decl(tree_node*, bool, bool)
???:0
0x8936ab instantiate_pending_templates(int)
???:0
0x79c46d c_parse_final_cleanups()
???: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.
ASM generation compiler returned: 1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-09 7:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-19 7:31 [Bug c++/106351] New: ICE in fold expression involving templatized lambda amir.ahmed.ansari at outlook dot com
2022-07-19 10:19 ` [Bug c++/106351] " marxin at gcc dot gnu.org
2022-08-09 7:09 ` 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).