aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/access15.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/access15.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/access15.C18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/access15.C b/gcc/testsuite/g++.old-deja/g++.jason/access15.C
new file mode 100644
index 00000000000..4380998521f
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.jason/access15.C
@@ -0,0 +1,18 @@
+// Bug: g++ complains about Z being a private base when trying to
+// initialize B::foo.
+// Build don't link:
+
+struct Z {
+ Z();
+ Z(int);
+};
+
+struct A : private Z { };
+struct B : public A
+{
+ Z foo;
+ B();
+ B(const B&);
+};
+
+B::B() : foo(1) { } // gets bogus error