Merge -r 127928:132243 from trunk
[official-gcc.git] / gcc / testsuite / g++.dg / ext / alias-canon.C
blob843dec00c94bad789ac6bd10e9c5d9e4b7aba06e
1 // PR c++/34935
2 /* { dg-do compile } */
3 /* { dg-final { scan-assembler "_Z1fi" } } */
4 /* { dg-final { scan-assembler "_Z1fb" } } */
5 /* { dg-final { scan-assembler "_Z1fd" } } */
6 /* { dg-final { scan-assembler "_Z1ff" } } */
7 /* { dg-final { scan-assembler "_Z1fw" } } */
9 typedef int INT __attribute((may_alias));
11 void f(int);
12 void f(INT) { }
14 typedef bool BOOL __attribute((may_alias));
16 void f(bool);
17 void f(BOOL) { }
19 typedef float FLOAT __attribute((may_alias));
21 void f(float);
22 void f(FLOAT) { }
24 typedef double DOUBLE __attribute((may_alias));
26 void f(double);
27 void f(DOUBLE) {}
29 typedef wchar_t WCHAR_T __attribute((may_alias));
31 void f(wchar_t);
32 void f(WCHAR_T) {}
34 void test()
36   f(0);
37   f(true);
38   f(1.0f);
39   f(1.0);
40   f(L'f');