summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/visibility-7.c
blob: 5bdc2b0280864c00daa4ae6b7e1f44f35878a3ef (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-assembler "\\.hidden.*xyzzy" } } */

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

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