aboutsummaryrefslogtreecommitdiff
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 00000000000..0d58ea0b3f3
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/access5.C
@@ -0,0 +1,22 @@
+// Build don't link:
+
+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;
+}
+