diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/attr-used.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/attr-used.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/attr-used.c b/gcc/testsuite/gcc.dg/attr-used.c new file mode 100644 index 00000000000..ba7705aaa77 --- /dev/null +++ b/gcc/testsuite/gcc.dg/attr-used.c @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-options "-O3" } */ + +static void function_declaration_before(void) __attribute__((__used__)); + +static void function_declaration_before(void) {} + +static void function_declaration_after(void) {} + +static void function_declaration_after(void) __attribute__((__used__)); + +/* { dg-final { scan-assembler "function_declaration_before" } } */ +/* { dg-final { scan-assembler "function_declaration_after" } } */ |