| 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" } } */ |
| 8 |
|
| 9 |
typedef int INT __attribute((may_alias)); |
| 10 |
|
| 11 |
void f(int); |
| 12 |
void f(INT) { } |
| 13 |
|
| 14 |
typedef bool BOOL __attribute((may_alias)); |
| 15 |
|
| 16 |
void f(bool); |
| 17 |
void f(BOOL) { } |
| 18 |
|
| 19 |
typedef float FLOAT __attribute((may_alias)); |
| 20 |
|
| 21 |
void f(float); |
| 22 |
void f(FLOAT) { } |
| 23 |
|
| 24 |
typedef double DOUBLE __attribute((may_alias)); |
| 25 |
|
| 26 |
void f(double); |
| 27 |
void f(DOUBLE) {} |
| 28 |
|
| 29 |
typedef wchar_t WCHAR_T __attribute((may_alias)); |
| 30 |
|
| 31 |
void f(wchar_t); |
| 32 |
void f(WCHAR_T) {} |
| 33 |
|
| 34 |
void test() |
| 35 |
{ |
| 36 |
f(0); |
| 37 |
f(true); |
| 38 |
f(1.0f); |
| 39 |
f(1.0); |
| 40 |
f(L'f'); |
| 41 |
} |