summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/visibility-7.c
blob: 8bf62d6e432986f510fadf1622d0acebbe4ad71a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* Test warning from conflicting visibility specifications. */
/* { dg-do compile } */
/* { dg-require-visibility "protected" } */
/* { dg-final { scan-hidden "xyzzy" } } */

extern int 
__attribute__((visibility ("hidden")))
xyzzy; /* { dg-message "note: previous declaration" } */

int 
__attribute__((visibility ("protected")))
xyzzy = 5; /* { dg-warning "different visibility" } */