8sa1-gcc/gcc/testsuite/g++.old-deja/g++.jason/opeq3.C
Jeff Law 921e5a0eb4 Initial revision
From-SVN: r14840
1997-08-19 01:34:40 -06:00

16 lines
253 B
C

// Bug: g++ generates code for assignment in invalid situations.
// Build don't link:
class X {
int& a;
public:
X(int& i): a(i) { };
};
void foo ()
{
int one=1, two=2;
X a(one), b(two);
a = b; // ERROR - no assignment semantics defined
};