From: Jason Merrill Date: Fri, 26 Sep 2025 12:51:33 +0000 (+0100) Subject: c++: add testcase [PR121854] X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6fda31f7b3f133a31e0a7179a82fe73b081ebbc5;p=thirdparty%2Fgcc.git c++: add testcase [PR121854] Add the testcase for this GCC 15 PR, already fixed on trunk by r16-970. PR c++/121854 gcc/testsuite/ChangeLog: * g++.dg/cpp23/explicit-obj-lambda19.C: New test. --- diff --git a/gcc/testsuite/g++.dg/cpp23/explicit-obj-lambda19.C b/gcc/testsuite/g++.dg/cpp23/explicit-obj-lambda19.C new file mode 100644 index 00000000000..bbf295cddf8 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp23/explicit-obj-lambda19.C @@ -0,0 +1,15 @@ +// PR c++/121854 +// { dg-do compile { target c++23 } } + +struct S +{ + static void static_func(){} + + void func() + { + auto lambda = [](this auto) + { + static_func(); + }; + } +};