2016-12-07 Thomas Preud'homme <thomas.preudhomme@arm.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / visibility-22.c
blob52f59be33415d6fd9da08ae7bcf36776ec215b53
1 /* PR target/32219 */
2 /* { dg-do run } */
3 /* { dg-require-visibility "" } */
4 /* { dg-options "-O2 -fPIC" { target fpic } } */
5 /* This test requires support for undefined weak symbols. This support
6 is not available on hppa*-*-hpux*. The test is skipped rather than
7 xfailed to suppress the warning that would otherwise arise. */
8 /* { dg-skip-if "" { "hppa*-*-hpux*" "*-*-aix*" "*-*-darwin*" } "*" { "" } } */
10 extern void foo () __attribute__((weak,visibility("hidden")));
11 int
12 main()
14 if (foo)
15 foo ();
16 return 0;