1 // PR c++/84082
2 // { dg-do compile }
3 // { dg-options "" }
4 
5 struct A;
6 
foo()7 template<typename> void foo()
8 {
9   static int a[A().operator=(A())];	// { dg-error "invalid use of incomplete type 'struct A'" }
10 }
11