aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Sebor <msebor@redhat.com>2021-11-29 13:13:30 -0700
committerMartin Sebor <msebor@redhat.com>2021-11-29 13:16:51 -0700
commitf81c5a86dc03352682ac8ae3daa6ec507528a265 (patch)
treefb8fdd0fba8efa43d74e3f68e688c780cd09dc7c
parented7894c490ac45578419408c32b25421c5feb04d (diff)
downloadgcc-f81c5a86dc03352682ac8ae3daa6ec507528a265.zip
gcc-f81c5a86dc03352682ac8ae3daa6ec507528a265.tar.gz
gcc-f81c5a86dc03352682ac8ae3daa6ec507528a265.tar.bz2
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.
-rw-r--r--gcc/testsuite/c-c++-common/attr-retain-5.c3
-rw-r--r--gcc/testsuite/c-c++-common/attr-retain-6.c3
-rw-r--r--gcc/testsuite/c-c++-common/attr-retain-9.c3
3 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/attr-retain-5.c b/gcc/testsuite/c-c++-common/attr-retain-5.c
index 1f3f8bf..5f8ed48 100644
--- a/gcc/testsuite/c-c++-common/attr-retain-5.c
+++ b/gcc/testsuite/c-c++-common/attr-retain-5.c
@@ -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)
{
diff --git a/gcc/testsuite/c-c++-common/attr-retain-6.c b/gcc/testsuite/c-c++-common/attr-retain-6.c
index ed6cfae..ace9a7e 100644
--- a/gcc/testsuite/c-c++-common/attr-retain-6.c
+++ b/gcc/testsuite/c-c++-common/attr-retain-6.c
@@ -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 } */
diff --git a/gcc/testsuite/c-c++-common/attr-retain-9.c b/gcc/testsuite/c-c++-common/attr-retain-9.c
index e6d7c0b..ab9bf4a 100644
--- a/gcc/testsuite/c-c++-common/attr-retain-9.c
+++ b/gcc/testsuite/c-c++-common/attr-retain-9.c
@@ -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 } */