]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: ICE with generic lambda and pack expansion [PR115425]
authorMarek Polacek <polacek@redhat.com>
Fri, 14 Jun 2024 21:50:29 +0000 (17:50 -0400)
committerMarek Polacek <polacek@redhat.com>
Tue, 25 Jun 2024 19:11:30 +0000 (15:11 -0400)
commited6ffc4e62f716d1b31d599d22594dd969da137f
treeb8e6ddccdb124966efc08d5846d79e05ca0dbcc0
parent71f484d02b2b3e8616cd7af27a0d4c72e4c7e977
c++: ICE with generic lambda and pack expansion [PR115425]

In r13-272 we hardened the *_PACK_EXPANSION and *_ARGUMENT_PACK macros.
That trips up here because make_pack_expansion returns error_mark_node
and we access that with PACK_EXPANSION_LOCAL_P.

PR c++/115425

gcc/cp/ChangeLog:

* pt.cc (tsubst_pack_expansion): Return error_mark_node if
make_pack_expansion doesn't work out.

gcc/testsuite/ChangeLog:

* g++.dg/cpp2a/lambda-generic12.C: New test.
gcc/cp/pt.cc
gcc/testsuite/g++.dg/cpp2a/lambda-generic12.C [new file with mode: 0644]