summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.ns/ns7.C
blob: ee834c56bd9a02940f4f1fa318c2cdd00757b3af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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)
{}