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
* [Bug c++/106351] ICE in fold expression involving templatized lambda
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 ` marxin at gcc dot gnu.org
2022-08-09 7:09 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-07-19 10:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106351
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
CC| |jason at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
Last reconfirmed| |2022-07-19
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed in r13-1390-g07ac550393d00fca where we rejected the code:
g++ pr106351.C -c
pr106351.C: In member function ‘void C<Args>::f()’:
pr106351.C:9:15: warning: expected ‘template’ keyword before dependent template
name [-Wmissing-template-keyword]
9 | }.operator()<Args>(),
| ^~~~~~~~
| template
pr106351.C:9:30: error: expected primary-expression before ‘>’ token
9 | }.operator()<Args>(),
| ^
pr106351.C:9:32: error: expected primary-expression before ‘)’ token
9 | }.operator()<Args>(),
| ^
pr106351.C:9:30: error: binary expression in operand of fold-expression
9 | }.operator()<Args>(),
pr106351.C:9:30: error: operand of fold expression has no unexpanded parameter
packs
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/106351] ICE in fold expression involving templatized lambda
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
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-08-09 7:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106351
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> ---
Yes this is a dup of bug 106024.
*** This bug has been marked as a duplicate of bug 106024 ***
^ 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).