2 // { dg-options "-frtti" }
3 // test of rtti of non-class types
8 int printf(const char *, ...);
26 const volatile int cvi = 10;
27 volatile const int vci = 20;
33 enum color { red, blue, green, yellow};
43 int xxf1 () { return 0; };
44 int xxf2 (int k) { return 0; };
51 int yyf1 (float f) { return 0; };
52 double yyf2 () {return yyd;};
62 int (XX::*ptmf3) (int);
84 if (typeid(i) != typeid(int)) error(1);
85 if (typeid(s) != typeid(short)) error(2);
86 if (typeid(c) != typeid(char)) error(3);
87 if (typeid(l) != typeid(long)) error(4);
88 if (typeid(ui) != typeid(unsigned int)) error(5);
89 if (typeid(us) != typeid(unsigned short)) error(6);
90 if (typeid(uc) != typeid(unsigned char)) error(7);
91 if (typeid(ul) != typeid(unsigned long)) error(8);
92 if (typeid(f) != typeid(float)) error(9);
93 if (typeid(d) != typeid(double)) error(10);
95 if (typeid(*pi) != typeid(int)) error(51);
96 if (typeid(pi) == typeid(ai)) error(52);
97 if (typeid(ri) != typeid(i)) error(53);
98 if (typeid(cvi) != typeid(vci)) error (54);
99 if (typeid(vci) != typeid(i)) error(55);
100 if (typeid(ci) != typeid(cvi)) error (56);
101 if (typeid(ci) != typeid(const int)) error(57);
103 if (typeid(func1) != typeid(func2)) error (81);
104 if (typeid(func2) == typeid(func3)) error (82);
105 if (typeid(func1) == typeid(func4)) error (83);
106 if (typeid(func3) == typeid(func4)) error (84);
108 if (typeid(red) != typeid(color)) error (101);
109 if (typeid(green) != typeid(blue)) error (102);
111 if (typeid(fp) != typeid(gp)) error (103);
112 if (typeid(gp) == typeid(hp)) error (104);
114 if (typeid(ptmd1) != typeid(ptmd2)) error (105);
115 if (typeid(ptmd1) == typeid(ptmd3)) error (106);
116 if (typeid(ptmd2) == typeid(ptmd4)) error (107);
118 if (typeid(ptmf1) != typeid(ptmf2)) error (108);
119 if (typeid(ptmf2) == typeid(ptmf3)) error (109);
120 if (typeid(ptmf1) == typeid(ptmf4)) error (110);