gcc/
[official-gcc.git] / gcc / testsuite / gcc.dg / visibility-2.c
blob0977abac2b8d47926bdd80f613a78eadd416ae2e
1 /* Test that visibility attribute on declaration extends to definition. */
2 /* { dg-do compile } */
3 /* { dg-require-visibility "" } */
4 /* { dg-final { scan-hidden "foo" } } */
6 void
7 __attribute__((visibility ("hidden")))
8 foo();
10 void foo() { }