PR c++/86728 - C variadic generic lambda.
[official-gcc.git] / gcc / testsuite / g++.dg / rtti / typeid11.C
blob384b0f417054e2bca3524345f26fd0dfe900117c
1 // { dg-do run }
3 #include <typeinfo>
5 struct Base { virtual void foo() {} }; // polymorphic
7 int main()
9   Base b;
10   Base *ary[] = { &b, &b, &b};
12   int iter = 0;
13   typeid(*ary[iter++]);
14   if (iter != 1)        // should be 1
15     __builtin_abort();  // but 2