diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr46674.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr46674.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr46674.c b/gcc/testsuite/gcc.dg/pr46674.c new file mode 100644 index 000000000..871b364c3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr46674.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-require-alias "" } */ +/* { dg-options "-O2" } */ + +#define LABEL3(pfx, x) # pfx x +#define LABEL2(pfx, x) LABEL3(pfx, x) +#define LABEL(x) LABEL2(__USER_LABEL_PREFIX__, x) + +int yum; +void dessert (void) { ++yum; } +extern void jelly (void) __asm__ (LABEL ("jelly2")) __attribute__ ((alias ("dessert"), weak)); +extern void wobbly (void) __attribute__ ((alias ("jelly2"), weak)); + +/* { dg-final { scan-assembler "wobbly" } } */ +/* { dg-final { scan-assembler "jelly2" } } */ |