| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-require-alias "" } */ |
| 3 |
/* { dg-options "-O2" } */ |
| 4 |
|
| 5 |
#define LABEL3(pfx, x) # pfx x |
| 6 |
#define LABEL2(pfx, x) LABEL3(pfx, x) |
| 7 |
#define LABEL(x) LABEL2(__USER_LABEL_PREFIX__, x) |
| 8 |
|
| 9 |
int yum; |
| 10 |
void dessert (void) { ++yum; } |
| 11 |
extern void jelly (void) __asm__ (LABEL ("jelly2")) __attribute__ ((alias ("dessert"), weak)); |
| 12 |
extern void wobbly (void) __attribute__ ((alias ("jelly2"), weak)); |
| 13 |
|
| 14 |
/* { dg-final { scan-assembler "wobbly" } } */ |
| 15 |
/* { dg-final { scan-assembler "jelly2" } } */ |