2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / decltype33.C
blob63d5a49139c5ab7e68657b895addd99359b72d8a
1 // PR c++/50084
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-fno-inline" }
5 template<typename>   struct remove_reference;
6 template<typename T> struct remove_reference<T&> { typedef T type; };
8 template <class T> void f(T) { }
10 void g()
12   struct { } * v = 0;
14   typedef remove_reference<decltype(*v)>::type at;
16   // The typedef should't assign the name "at" to the struct.
17   // { dg-final { scan-assembler "_Z1fIZ1gvEUt_EvT_" } }
18   f(at());