aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/visibility-7.c
blob: aaa8165e3e0b85dbe670015d632425fa07d7c38c (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-warning "previous declaration" "" } */

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