aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/testsuite/g++.dg/parse/crash72.C12
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> ();
+}