2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.law / operators11.C
blob6c288308383754a1c90ef9f420d405e69fc69da4
1 // { dg-do assemble  }
2 // GROUPS passed operators
3 // opr-eq file
4 // Message-Id: <CCJrut.9M7@csc.ti.com>
5 // From: rowlands@hc.ti.com (Jon Rowlands)
6 // Subject: g++ 2.4.5: assignment operator in base class
7 // Date: Mon, 30 Aug 1993 00:54:29 GMT
9 class B {
10 public:
11         B &     operator = (B); // delete this line and problem goes away
14 class D : public B {
15 public:
16         D();
17         D(int);
18         D(B);
21 int
22 main() {
23         B       b;
24         D       d;
26         d = d;
28         d = 0;  // t.cxx:20: assignment not defined for type `D'
29         d = D(0);
31         d = b;  // t.cxx:23: assignment not defined for type `D'
32         d = D(b);
34         return(0);