Fix ICE in substring-handling building 502.gcc_r (PR 87562)
[official-gcc.git] / gcc / testsuite / gcc.dg / visibility-21.c
blob59d1b45674bf620a3f80d9891630cd9c13134f82
1 /* Test visibility attribute on function definition. */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fsection-anchors" } */
4 /* { dg-require-visibility "" } */
5 /* { dg-require-weak "" } */
6 /* { dg-require-effective-target section_anchors } */
7 /* { dg-final { scan-assembler-not "ANCHOR" } } */
9 int __attribute__((weak, visibility("hidden"))) weak_hidden[3];
11 int *f_weak_hidden ()
13 return weak_hidden;