1 /* { dg-do compile } */ 2 3 static const int __attribute__ ((used)) cst_local = 4; 4 static int __attribute__ ((used)) glob_local = 5; 5 const int __attribute__ ((used)) cst_export = 4; 6 int __attribute__ ((used)) glob_export = 5; 7 extern const int cst_import; 8 extern int glob_import; 9 Foo()10int Foo () 11 { 12 return cst_import + glob_import; 13 } 14 15 /* { dg-final { scan-assembler "\[\r\n\]\[\t \]*.visible .global \[^,\r\n\]*glob_export" } } */ 16 /* { dg-final { scan-assembler "\[\r\n\]\[\t \]*.visible .const \[^,\r\n\]*cst_export" } } */ 17 /* { dg-final { scan-assembler "\[\r\n\]\[\t \]*.global \[^,\r\n\]*glob_local" } } */ 18 /* { dg-final { scan-assembler "\[\r\n\]\[\t \]*.const \[^,\r\n\]*cst_local" } } */ 19 /* { dg-final { scan-assembler "\[\r\n\]\[\t \]*.extern .global \[^,\r\n\]*glob_import" } } */ 20 /* { dg-final { scan-assembler "\[\r\n\]\[\t \]*.extern .const \[^,\r\n\]*cst_import" } } */ 21