diff options
author | Simon Martin <simartin@gcc.gnu.org> | 2024-05-24 10:56:36 +0200 |
---|---|---|
committer | Simon Martin <simartin@gcc.gnu.org> | 2024-05-27 11:20:48 +0200 |
commit | 88c9b96b2800ddb7a499bd10abaa9441a471d5fe (patch) | |
tree | 1d21700c15285631aa0f001fb4b90e0ae741d631 /gcc | |
parent | 6e974827232b90b05a8e1dc6d2ed7b918f2b6c93 (diff) | |
download | gcc-88c9b96b2800ddb7a499bd10abaa9441a471d5fe.zip gcc-88c9b96b2800ddb7a499bd10abaa9441a471d5fe.tar.gz gcc-88c9b96b2800ddb7a499bd10abaa9441a471d5fe.tar.bz2 |
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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/g++.dg/parse/crash72.C | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/parse/crash72.C b/gcc/testsuite/g++.dg/parse/crash72.C new file mode 100644 index 0000000..df469e2 --- /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 <typename> void bar () +{ + [] <int> {}.operator () <> (); // { dg-error "expected primary-expression" } +} +void foo () +{ + bar<int> (); +} |