testsuite: Add -Wno-psabi to pr104505.c
[official-gcc.git] / gcc / testsuite / c-c++-common / attr-retain-5.c
blob5f8ed48d077f9b9660ad29752bae507695894727
1 /* { dg-do compile { target R_flag_in_section } } */
2 /* { dg-skip-if "non-ELF target" { *-*-darwin* powerpc*-*-aix* } } */
3 /* { dg-options "-Wall -O2" } */
5 struct dtv_slotinfo_list
7 struct dtv_slotinfo_list *next;
8 };
10 extern struct dtv_slotinfo_list *list;
12 static int __attribute__ ((section ("__libc_freeres_fn")))
13 free_slotinfo (struct dtv_slotinfo_list **elemp)
14 /* { dg-warning "'.*' without 'retain' attribute and '.*' with 'retain' attribute are placed in a section with the same name" "" { target R_flag_in_section } .-1 } */
16 if (!free_slotinfo (&(*elemp)->next))
17 return 0;
18 return 1;
21 /* Prune out the valid warning for the function above:
22 { dg-prune-output "-Winfinite-recursion" } */
24 __attribute__ ((used, retain, section ("__libc_freeres_fn")))
25 static void free_mem (void)
27 free_slotinfo (&list);
30 /* { dg-final { scan-assembler "__libc_freeres_fn,\"ax\"" { target R_flag_in_section } } } */
31 /* { dg-final { scan-assembler "__libc_freeres_fn,\"axR\"" { target R_flag_in_section } } } */