1 // PR c++/50084
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-fno-inline" }
4 
5 template<typename>   struct remove_reference;
6 template<typename T> struct remove_reference<T&> { typedef T type; };
7 
8 template <class T> void f(T) { }
9 
10 void g()
11 {
12   struct { } * v = 0;
13 
14   typedef remove_reference<decltype(*v)>::type at;
15 
16   // The typedef should't assign the name "at" to the struct.
17   // { dg-final { scan-assembler "_Z1fIZ1gvEUt_EvT_" } }
18   f(at());
19 }
20