gcc/testsuite/gcc.dg/localalias-2.c
raw| 1 | /* { dg-require-alias "" } */ |
| 2 | extern void abort (void); |
| 3 | int test2count; |
| 4 | __attribute__ ((weak,noinline)) |
| 5 | void test(void) |
| 6 | { |
| 7 | test2count++; |
| 8 | } |
| 9 | __attribute ((alias("test"))) |
| 10 | static void test2(void); |
| 11 | |
| 12 | void tt() |
| 13 | { |
| 14 | int prev = test2count; |
| 15 | /* This call must bind locally. */ |
| 16 | test2(); |
| 17 | if (test2count == prev) |
| 18 | abort(); |
| 19 | test(); |
| 20 | } |