summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/other/friend5.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/other/friend5.C')
-rw-r--r--gcc/testsuite/g++.dg/other/friend5.C9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/other/friend5.C b/gcc/testsuite/g++.dg/other/friend5.C
new file mode 100644
index 000000000..b0ec201fb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/friend5.C
@@ -0,0 +1,9 @@
+/* PR c++/32111 */
+/* This used to ICE. */
+
+/* { dg-do compile } */
+
+struct A
+{
+ friend A::~A() {} /* { dg-error "implicitly friends of their class" } */
+};