diff mbox series

[COMMITTED] c++: Add test for PR96652

Message ID 20200922203007.435001-1-ppalka@redhat.com
State New
Headers show
Series [COMMITTED] c++: Add test for PR96652 | expand

Commit Message

Patrick Palka Sept. 22, 2020, 8:30 p.m. UTC
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 mbox series

Patch

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 <typename T>
+struct B
+{
+  A m;
+  friend decltype(m);
+};
+
+A a;
+B<int> b;