summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/access5.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/access5.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/access5.C22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/access5.C b/gcc/testsuite/g++.old-deja/g++.other/access5.C
new file mode 100644
index 000000000..431ba416a
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/access5.C
@@ -0,0 +1,22 @@
+// { dg-do assemble }
+
+class A
+{
+protected:
+ int i;
+};
+
+class B : private A
+{
+protected:
+ A::i;
+};
+
+struct C : public B {
+ friend int f(C *p);
+};
+
+int f(C *p) {
+ return p->i;
+}
+