Prune out valid -Winfinite-recursion [PR103469].

gcc/testsuite/ChangeLog:
	PR testsuite/103469
	* c-c++-common/attr-retain-5.c: Prune out valid warning.
	* c-c++-common/attr-retain-6.c: Same.
	* c-c++-common/attr-retain-9.c: Same.
This commit is contained in:
Martin Sebor 2021-11-29 13:13:30 -07:00
parent ed7894c490
commit f81c5a86dc
3 changed files with 9 additions and 0 deletions

View File

@ -18,6 +18,9 @@ free_slotinfo (struct dtv_slotinfo_list **elemp)
return 1;
}
/* Prune out the valid warning for the function above:
{ dg-prune-output "-Winfinite-recursion" } */
__attribute__ ((used, retain, section ("__libc_freeres_fn")))
static void free_mem (void)
{

View File

@ -17,6 +17,9 @@ free_slotinfo (struct dtv_slotinfo_list **elemp)
return 1;
}
/* Prune out the valid warning for the function above:
{ dg-prune-output "-Winfinite-recursion" } */
__attribute__ ((section ("__libc_freeres_fn")))
void free_mem (void)
/* { dg-warning "'.*' without 'retain' attribute and '.*' with 'retain' attribute are placed in a section with the same name" "" { target R_flag_in_section } .-1 } */

View File

@ -17,6 +17,9 @@ free_slotinfo (struct dtv_slotinfo_list **elemp)
return 1;
}
/* Prune out the valid warning for the function above:
{ dg-prune-output "-Winfinite-recursion" } */
__attribute__ ((section ("__libc_freeres_fn")))
static void free_mem (void)
/* { dg-warning "defined but not used" "" { target *-*-* } .-1 } */