summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/visibility-17.c
blob: 0ff3e83de4b707749ccd017553c65c9569710e47 (plain)
1
2
3
4
5
6
7
8
9
10
/* Test that external variable whose address is taken are marked. */
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-darwin* } { "*" } { "" } } */
/* { dg-require-visibility "" } */
/* { dg-final { scan-hidden "foo" } } */

extern int foo __attribute__ ((visibility ("hidden")));
int *f () {
  return &foo;
}