diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/darwin-20040812-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/darwin-20040812-1.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/darwin-20040812-1.c b/gcc/testsuite/gcc.dg/darwin-20040812-1.c new file mode 100644 index 000000000..4ae8657ba --- /dev/null +++ b/gcc/testsuite/gcc.dg/darwin-20040812-1.c @@ -0,0 +1,24 @@ +/* Test dead code strip support. */ +/* Contributed by Devang Patel <dpatel@apple.com> */ + +/* { dg-do compile { target *-*-darwin* } } */ + +const char my_version_string[] __attribute__((__used__)) + = "Do not remove this string\n"; + + static int + __attribute__((__used__)) + static_debug_routine() +{ + int i; + i = 42; +} + +int +main () +{ + return 0; +} + +/* { dg-final { scan-assembler ".no_dead_strip _my_version_string" } } */ +/* { dg-final { scan-assembler ".no_dead_strip _static_debug_routine" } } */ |