summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.ns/ns7.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.ns/ns7.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.ns/ns7.C26
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.ns/ns7.C b/gcc/testsuite/g++.old-deja/g++.ns/ns7.C
new file mode 100644
index 000000000..ee834c56b
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.ns/ns7.C
@@ -0,0 +1,26 @@
+// { dg-do assemble }
+namespace A{
+ struct X{
+ int i;
+ X(){}
+ X(int j);
+ void operator=(const X&);
+ virtual ~X(){}
+ };
+ void X::operator=(const X&o)
+ {
+ i=o.i;
+ }
+}
+
+A::X::X(int j):i(j){}
+
+namespace A{
+ struct Y:public X{
+ int j;
+ Y(int,int);
+ };
+}
+
+A::Y::Y(int a,int b):X(a),j(b)
+{}