From e271cd0234d5db2f95c35454b8b29b6e8386caa8 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Thu, 10 Dec 2020 09:56:40 -0500 Subject: [PATCH] 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. --- gcc/testsuite/g++.dg/cpp0x/friend6.C | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/friend6.C 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; +} -- 2.30.2