PR c++/86728 - C variadic generic lambda.
[official-gcc.git] / gcc / testsuite / g++.dg / rtti / typeid9.C
blob381252dc6b08b6eb3d19a453ba86b0be880a591d
1 // Test that the typeid name for a local class is properly null-terminated.
2 // { dg-do run }
4 #include <string.h>
5 #include <typeinfo>
6 #include <stdio.h>
8 int f()
10   struct A {}; struct B {};
11   const std::type_info &ti = typeid(A);
12   const std::type_info &ti2 = typeid(B);
13   puts (ti.name());
14   puts (ti2.name());
15   return strcmp (ti.name(), "Z1fvE1A") || strcmp (ti2.name(), "Z1fvE1B");
18 int main()
20   return f();