summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/darwin-20040812-1.c
blob: 4ae8657ba0d9f3b033e96871fe4598579cda9da7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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" } } */