ubuntu-buildroot/output/build/host-gcc-initial-11.4.0/gcc/testsuite/gcc.target/nvptx/decl.c

21 lines
876 B
C
Raw Permalink Normal View History

2024-04-01 15:19:46 +00:00
/* { dg-do compile } */
static const int __attribute__ ((used)) cst_local = 4;
static int __attribute__ ((used)) glob_local = 5;
const int __attribute__ ((used)) cst_export = 4;
int __attribute__ ((used)) glob_export = 5;
extern const int cst_import;
extern int glob_import;
int Foo ()
{
return cst_import + glob_import;
}
/* { dg-final { scan-assembler "\[\r\n\]\[\t \]*.visible .global \[^,\r\n\]*glob_export" } } */
/* { dg-final { scan-assembler "\[\r\n\]\[\t \]*.visible .const \[^,\r\n\]*cst_export" } } */
/* { dg-final { scan-assembler "\[\r\n\]\[\t \]*.global \[^,\r\n\]*glob_local" } } */
/* { dg-final { scan-assembler "\[\r\n\]\[\t \]*.const \[^,\r\n\]*cst_local" } } */
/* { dg-final { scan-assembler "\[\r\n\]\[\t \]*.extern .global \[^,\r\n\]*glob_import" } } */
/* { dg-final { scan-assembler "\[\r\n\]\[\t \]*.extern .const \[^,\r\n\]*cst_import" } } */