[ld] Fix failure of pr19161 on hppa*-*linux*.
[deliverable/binutils-gdb.git] / ld / testsuite / ld-gc / gc.c
CommitLineData
ac69cbc6
TG
1int unused_var = 7;
2int used_var = 7;
3
4int
5unused_func (int v)
6{
7 return 3 * unused_var;
8}
9
10int
f9dd0b02 11__attribute__((noinline))
ac69cbc6
TG
12used_func (int v)
13{
14 return 2 * used_var;
15}
16
17int
18main (void)
19{
20 return used_func (5);
21}
6b87b48e
NC
22
23void
24dummy_func (void)
25{
26 /* These are here in case the target prepends an underscore to
27 the start of function names. They are inside a dummy function
28 so that they will appear at the end of gcc's assembler output,
29 after the definitions of main() and used_func(), rather than
30 at the beginning of the file. */
31
32 __asm__(".ifndef main\n\
33.global main\n\
34.set main, _main\n\
35.endif");
36
37 __asm__(".ifndef used_func\n\
38.global used_func\n\
39.set used_func, _used_func\n\
40.endif");
41}
This page took 0.539893 seconds and 4 git commands to generate.