diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/localalias-2.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/localalias-2.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/localalias-2.c b/gcc/testsuite/gcc.dg/localalias-2.c new file mode 100644 index 00000000000..43d59e4d4ed --- /dev/null +++ b/gcc/testsuite/gcc.dg/localalias-2.c @@ -0,0 +1,19 @@ +extern void abort (void); +int test2count; +__attribute__ ((weak,noinline)) +void test(void) +{ + test2count++; +} +__attribute ((alias("test"))) +static void test2(void); + +void tt() +{ + int prev = test2count; + /* This call must bind locally. */ + test2(); + if (test2count == prev) + abort(); + test(); + } |