summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/using1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/using1.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/using1.C27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/using1.C b/gcc/testsuite/g++.old-deja/g++.other/using1.C
new file mode 100644
index 000000000..d734576ac
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/using1.C
@@ -0,0 +1,27 @@
+// { dg-do assemble }
+class D2;
+
+class B {
+private:
+ int a; // { dg-error "" } B::a is private
+protected:
+ int b;
+
+ friend class D2;
+};
+
+class D : public B { // { dg-error "" } within this context
+public:
+ using B::a;
+ using B::b;
+};
+
+class D2 : public B { // { dg-error "" } conflicting access specifications
+public:
+ using B::a;
+ using B::b;
+
+private:
+ using B::b;
+};
+