1 // PR c++/71450
2 // { dg-do compile { target c++11 } }
3 
4 struct A { A operator+ (A a) { return a; } };
5 
6 template <class T>
foo(T t)7 void foo (T t)
8 {
9   auto x = t + x;	// { dg-error "use of 'x' before deduction of 'auto'" }
10 }
11 
12 int
main()13 main ()
14 {
15   foo (A ());
16 }
17