Merge -r 127928:132243 from trunk
[official-gcc.git] / gcc / testsuite / g++.dg / rtti / typeid7.C
blob7391405fcd92f916cadc704ae003cfbdf7ad1b5a
1 // PR c++/32260
2 // { dg-do compile }
3 // { dg-options "-O2 -W -Wall" }
5 #include <typeinfo>
7 const std::type_info &
8 f1 (int i)
10   return typeid (i + 1);
13 const std::type_info &
14 f2 ()
16   return typeid (int);
19 struct A
21   A ();
22   virtual ~A ();
23   void foo ();
26 const std::type_info &
27 f3 ()
29   return typeid (A);
32 const std::type_info &
33 f4 (A *p)
35   return typeid (*p);
38 const std::type_info &
39 f5 ()
41   return typeid (int *);
44 const std::type_info &
45 f6 ()
47   return typeid (int [26][12]);
50 const std::type_info &
51 f7 ()
53   return typeid (int [26][12]);
56 void (A::*pmr) ();
57 const std::type_info &
58 f8 ()
60   return typeid (pmr);