2017-11-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / visibility-7.c
blob016f3dda6f329999c25fa4ff955d870a651ff149
1 /* Test warning from conflicting visibility specifications. */
2 /* { dg-do compile } */
3 /* { dg-require-visibility "protected" } */
4 /* { dg-final { scan-hidden "xyzzy" } } */
6 extern int
7 __attribute__((visibility ("hidden")))
8 xyzzy; /* { dg-message "note: previous declaration" "" } */
10 int
11 __attribute__((visibility ("protected")))
12 xyzzy = 5; /* { dg-warning "different visibility" "" } */