aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/visibility-21.c
blob: 59d1b45674bf620a3f80d9891630cd9c13134f82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* Test visibility attribute on function definition. */
/* { dg-do compile } */
/* { dg-options "-O2 -fsection-anchors" } */
/* { dg-require-visibility "" } */
/* { dg-require-weak "" } */
/* { dg-require-effective-target section_anchors } */
/* { dg-final { scan-assembler-not "ANCHOR" } } */

int __attribute__((weak, visibility("hidden"))) weak_hidden[3];

int *f_weak_hidden ()
{
  return weak_hidden;
}