From: Marek Polacek Date: Thu, 10 Dec 2020 14:56:40 +0000 (-0500) Subject: c++: Add fixed test [PR68451] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e271cd0234d5db2f95c35454b8b29b6e8386caa8;p=gcc.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 00000000000..fce7e55383e --- /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; +}