From: Simon Martin Date: Tue, 4 Jun 2024 09:59:31 +0000 (+0200) Subject: c++: Add testcase for PR103338 X-Git-Tag: basepoints/gcc-16~8534 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=126ccf8ffc46865accec22a2789f09abd98c1d85;p=thirdparty%2Fgcc.git c++: Add testcase for PR103338 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. --- 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 +struct zip_view { + struct Iterator; +}; + +template +struct zip_transform_view; + +template +struct zip_view::Iterator { // { dg-error "no class template" } + template + template + friend class zip_transform_view::Iterator; +}; + +zip_view<>::Iterator iter;