From: Marek Polacek Date: Thu, 10 Dec 2020 14:56:40 +0000 (-0500) Subject: c++: Add fixed test [PR68451] X-Git-Tag: upstream/12.2.0~11042 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e271cd0234d5db2f95c35454b8b29b6e8386caa8;p=platform%2Fupstream%2Fgcc.git c++: Add fixed test [PR68451] I was about to add this test with dg-ice but it turned out it had already been fixed by the recent r11-3361! gcc/testsuite/ChangeLog: PR c++/68451 * g++.dg/cpp0x/friend6.C: New test. --- diff --git a/gcc/testsuite/g++.dg/cpp0x/friend6.C b/gcc/testsuite/g++.dg/cpp0x/friend6.C new file mode 100644 index 0000000..fce7e55 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/friend6.C @@ -0,0 +1,23 @@ +// PR c++/68451 +// { dg-do compile { target c++11 } } + +struct A {}; + +struct B +{ + A a; + friend decltype(a); +}; + +template +struct C +{ + A a; + friend decltype(a); +}; + +int main() +{ + B b; + C c; +}