gcc/testsuite/gcc.dg/visibility-21.c
raw| 1 | /* Test visibility attribute on function definition. */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-O2 -fsection-anchors" } */ |
| 4 | /* { dg-require-visibility "" } */ |
| 5 | /* { dg-require-weak "" } */ |
| 6 | /* { dg-require-effective-target section_anchors } */ |
| 7 | /* { dg-final { scan-assembler-not "ANCHOR" } } */ |
| 8 | |
| 9 | int __attribute__((weak, visibility("hidden"))) weak_hidden[3]; |
| 10 | |
| 11 | int *f_weak_hidden () |
| 12 | { |
| 13 | return weak_hidden; |
| 14 | } |