1 // Positive test for auto
2 // { dg-do run { target c++11 } }
5 extern "C" void abort();
13 A operator+(A a) { return a; }
20 if (typeid(x) != typeid(t+t))
23 auto p = new auto(&t);
24 if (typeid(p) != typeid(T**))
31 if (typeid (i) != typeid (int))
35 if (typeid (p) != typeid (int*))
39 if (typeid (p2) != typeid (int**))
43 if (typeid (fp) != typeid (int (*)()))
47 if (typeid (pm) != typeid (int A::*))
50 auto (A::*pmf)() = &A::f;
51 if (typeid (pmf) != typeid (int (A::*)()))
58 auto *p3 = new auto (i);
59 if (typeid (p3) != typeid (int*))
62 for (auto idx = i; idx != 0; idx = 0);