1 // { dg-do assemble  }
2 // Bug: g++ generates code for assignment in invalid situations.
3 
4 class X { // { dg-error "reference|operator=" }
5   int& a;
6 public:
X(int & i)7   X(int& i): a(i) { }
8 };
9 
foo()10 void foo ()
11 {
12   int one=1, two=2;
13   X a(one), b(two);
14   a = b;			// { dg-message "synthesized|deleted" }
15 }
16