aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/visibility-7.c
blob: f5e6e9aae5cec5849e9297fb991f9108cd0a5ec2 (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 "" } */
/* { dg-final { scan-hidden "xyzzy" } } */

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

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