From: Simon Martin Date: Fri, 24 May 2024 08:56:36 +0000 (+0200) Subject: Add testcase for PR c++/105229: ICE in lookup_template_class_1 X-Git-Tag: basepoints/gcc-16~8706 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88c9b96b2800ddb7a499bd10abaa9441a471d5fe;p=thirdparty%2Fgcc.git Add testcase for PR c++/105229: ICE in lookup_template_class_1 The test case in PR c++/105229 has been fixed since 11.4 (via PR c++/106024) - the attached patch simply adds the case to the test suite. Successfully tested on x86_64-pc-linux-gnu. PR c++/105229 gcc/testsuite/ChangeLog: * g++.dg/parse/crash72.C: New test. --- diff --git a/gcc/testsuite/g++.dg/parse/crash72.C b/gcc/testsuite/g++.dg/parse/crash72.C new file mode 100644 index 00000000000..df469e20f28 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/crash72.C @@ -0,0 +1,12 @@ +// PR c++/105229 +// { dg-do compile { target c++20 } } +// { dg-additional-options "-Wno-missing-template-keyword" } + +template void bar () +{ + [] {}.operator () <> (); // { dg-error "expected primary-expression" } +} +void foo () +{ + bar (); +}