gcc/testsuite/gcc.dg/visibility-22.c
raw| 1 | /* PR target/32219 */ |
| 2 | /* { dg-do run } */ |
| 3 | /* { dg-require-visibility "" } */ |
| 4 | /* { dg-require-effective-target weak_undefined } */ |
| 5 | /* { dg-options "-O2 -fPIC" { target fpic } } */ |
| 6 | /* { dg-add-options weak_undefined } */ |
| 7 | |
| 8 | extern void foo () __attribute__((weak,visibility("hidden"))); |
| 9 | int |
| 10 | main() |
| 11 | { |
| 12 | if (foo) |
| 13 | foo (); |
| 14 | return 0; |
| 15 | } |