PR c++/67273
[official-gcc.git] / gcc / testsuite / gcc.target / arm / pr66912.c
blob27e4c452bd305d9544905122e3a28177627eccd3
1 /* { dg-do compile { target *-*-linux* } } */
2 /* { dg-options "-O2 -fpic" } */
4 __attribute__((visibility("protected")))
5 int n_common;
7 __attribute__((weak, visibility("protected")))
8 int n_weak_common;
10 __attribute__((visibility("protected")))
11 int n_init = -1;
13 __attribute__((weak, visibility("protected")))
14 int n_weak_init = -1;
16 int
17 f1 ()
19 /* { dg-final { scan-assembler "\\.word\\tn_common\\(GOT\\)" } } */
20 return n_common;
23 int
24 f2 ()
26 /* { dg-final { scan-assembler "\\.word\\tn_weak_common\\(GOT\\)" } } */
27 return n_weak_common;
30 int
31 f3 ()
33 /* { dg-final { scan-assembler "\\.word\\tn_init\\(GOT\\)" } } */
34 return n_init;
37 int
38 f4 ()
40 /* { dg-final { scan-assembler "\\.word\\tn_weak_init\\(GOT\\)" } } */
41 return n_weak_init;