Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / c-c++-common / attr-used-6.c
blob00b128205b6364db075664252e484574223e25e4
1 /* { dg-do compile } */
2 /* { dg-skip-if "non-ELF target" { *-*-darwin* } } */
3 /* { dg-options "-Wall -Wno-infinite-recursion -O2" } */
5 struct dtv_slotinfo_list
7 struct dtv_slotinfo_list *next;
8 };
10 extern struct dtv_slotinfo_list *list;
12 static int __attribute__ ((used, section ("__libc_freeres_fn")))
13 free_slotinfo (struct dtv_slotinfo_list **elemp)
15 if (!free_slotinfo (&(*elemp)->next))
16 return 0;
17 return 1;
20 __attribute__ ((section ("__libc_freeres_fn")))
21 void free_mem (void)
23 free_slotinfo (&list);
26 /* { dg-final { scan-assembler "__libc_freeres_fn,\"ax\"" { target R_flag_in_section } } } */
27 /* { dg-final { scan-assembler-not "__libc_freeres_fn,\"axR\"" { target R_flag_in_section } } } */