aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSimon Martin <simon@nasilyan.com>2024-06-04 11:59:31 +0200
committerSimon Martin <simon@nasilyan.com>2024-06-04 20:19:39 +0200
commit126ccf8ffc46865accec22a2789f09abd98c1d85 (patch)
tree918fbb00911f55b02d17179448ea6027b5ea4820 /gcc
parent7f21aee0d4ef95eee7d9f7f42e9a056715836648 (diff)
c++: Add testcase for PR103338HEADtrunkmaster
The case in that PR used to ICE until commit f04dc89. This patch simply adds the case to the testsuite. Successfully tested on x86_64-pc-linux-gnu. PR c++/103388 gcc/testsuite/ChangeLog: * g++.dg/parse/crash73.C: New test.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.dg/parse/crash73.C19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/parse/crash73.C b/gcc/testsuite/g++.dg/parse/crash73.C
new file mode 100644
index 00000000000..97b8b5e8325
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/crash73.C
@@ -0,0 +1,19 @@
+// PR c++/103338
+// { dg-do compile { target c++11 } }
+
+template<class...>
+struct zip_view {
+ struct Iterator;
+};
+
+template<class...>
+struct zip_transform_view;
+
+template<class... Views>
+struct zip_view<Views...>::Iterator { // { dg-error "no class template" }
+ template<class... Uiews>
+ template<bool>
+ friend class zip_transform_view<Uiews...>::Iterator;
+};
+
+zip_view<>::Iterator iter;