diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/darwin-weakimport-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/darwin-weakimport-1.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/darwin-weakimport-1.c b/gcc/testsuite/gcc.dg/darwin-weakimport-1.c new file mode 100644 index 00000000000..c797720e4e2 --- /dev/null +++ b/gcc/testsuite/gcc.dg/darwin-weakimport-1.c @@ -0,0 +1,16 @@ +/* { dg-do compile { target *-*-darwin* } } */ +/* { dg-require-weak "" } */ +/* { dg-options "-fno-common" } */ + +/* { dg-final { scan-assembler "weak_reference _a" } } */ +/* { dg-final { scan-assembler-not "weak_\[a-z \t\]*_b" } } */ + +extern void a (void) __attribute__((weak_import)); +extern void b (void) __attribute__((weak_import)); + +void b(void) +{ + a(); +} + +extern int c __attribute__((weak_import)); /* { dg-warning "ignored" } */ |