aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/visibility-22.c
blob: 52f59be33415d6fd9da08ae7bcf36776ec215b53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* PR target/32219 */
/* { dg-do run } */
/* { dg-require-visibility "" } */
/* { dg-options "-O2 -fPIC" { target fpic } } */
/* This test requires support for undefined weak symbols.  This support
   is not available on hppa*-*-hpux*.  The test is skipped rather than
   xfailed to suppress the warning that would otherwise arise.  */
/* { dg-skip-if "" { "hppa*-*-hpux*" "*-*-aix*" "*-*-darwin*" } "*" { "" } }  */

extern void foo () __attribute__((weak,visibility("hidden")));
int
main()
{
  if (foo)
    foo ();
  return 0;
}