1 /* Test that -fvisibility-inlines-hidden doesn't affect static variables. */
2 /* { dg-do compile } */
3 /* { dg-require-visibility "" } */
4 /* { dg-options "-fvisibility-inlines-hidden" } */
5 /* { dg-final { scan-not-hidden "_ZZN3foo7my_funcEvE1x" } } */
6 
7 struct foo
8 {
my_funcfoo9   int my_func() {
10     static int x;
11     return x++;
12   }
13 };
14 
t()15 int t()
16 {
17   foo f;
18   return f.my_func();
19 }
20