summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/visibility-7.c
blob: 016f3dda6f329999c25fa4ff955d870a651ff149 (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" "" } */