From c4e4e163c79ca3fca265b85f44b869cb54e802b3 Mon Sep 17 00:00:00 2001 From: Patrick Palka Date: Tue, 22 Sep 2020 16:26:49 -0400 Subject: [PATCH] c++: Add test for PR96652 Fixed by r11-3361. gcc/testsuite/ChangeLog: PR c++/96652 * g++.dg/cpp0x/decltype-96652.C: New test. --- gcc/testsuite/g++.dg/cpp0x/decltype-96652.C | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/decltype-96652.C diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype-96652.C b/gcc/testsuite/g++.dg/cpp0x/decltype-96652.C new file mode 100644 index 00000000000..249cce2b9e8 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/decltype-96652.C @@ -0,0 +1,14 @@ +// PR c++/96652 +// { dg-do compile { target c++11 } } + +struct A {}; + +template +struct B +{ + A m; + friend decltype(m); +}; + +A a; +B b; -- 2.30.2