1 /* Test visibility attribute. */
2 /* { dg-do compile { target ia64*-*-linux* } } */
3 /* { dg-options "-O2 -fpic" } */
4 /* { dg-final { scan-assembler "\\.hidden.*variable_j" } } */
5 /* { dg-final { scan-assembler "\\.hidden.*variable_m" } } */
6 /* { dg-final { scan-assembler "\\.protected.*baz" } } */
7 /* { dg-final { scan-assembler "gprel.*variable_i" } } */
8 /* { dg-final { scan-assembler "gprel.*variable_j" } } */
9 /* { dg-final { scan-assembler "ltoff.*variable_k" } } */
10 /* { dg-final { scan-assembler "gprel.*variable_l" } } */
11 /* { dg-final { scan-assembler "gprel.*variable_m" } } */
12 /* { dg-final { scan-assembler "ltoff.*variable_n" } } */
14 static int variable_i
;
15 int variable_j
__attribute__((visibility ("hidden")));
17 struct A
{ char a
[64]; };
18 static struct A variable_l
__attribute__((section (".sbss")));
19 struct A variable_m
__attribute__((visibility ("hidden"), section(".sbss")));
20 struct A variable_n
__attribute__((section (".sbss")));
24 return variable_i
+ variable_j
+ variable_k
;
34 void __attribute__((visibility ("protected"))) baz (void)