* [Testsuite] Skip -fdelete-null-pointer-check tests if target keeps_null_pointer_checks
@ 2023-05-15 5:06 SenthilKumar.Selvaraj
2023-05-16 4:34 ` Jeff Law
0 siblings, 1 reply; 2+ messages in thread
From: SenthilKumar.Selvaraj @ 2023-05-15 5:06 UTC (permalink / raw)
To: gcc-patches; +Cc: ro, mikestump
Hi,
When running regression tests related to https://gcc.gnu.org/pipermail/gcc-patches/2023-April/616772.html,
I noticed a bunch of failures because some tests explicitly pass in
-fdelete-null-pointer-checks, even if the target is configured to keep them.
This patch skips such failing tests by adding a dg-skip-if for keeps_null_pointer_checks.
Ok to commit?
Regards
Senthil
gcc/testsuite/ChangeLog:
* gcc.dg/attr-returns-nonnull.c: Skip if
keeps_null_pointer_checks.
* gcc.dg/init-compare-1.c: Likewise.
* gcc.dg/ipa/pr85734.c: Likewise.
* gcc.dg/ipa/propmalloc-1.c: Likewise.
* gcc.dg/ipa/propmalloc-2.c: Likewise.
* gcc.dg/ipa/propmalloc-3.c: Likewise.
* gcc.dg/ipa/propmalloc-4.c: Likewise.
* gcc.dg/tree-ssa/evrp11.c: Likewise.
* gcc.dg/tree-ssa/pr83648.c: Likewise.
diff --git gcc/testsuite/gcc.dg/attr-returns-nonnull.c gcc/testsuite/gcc.dg/attr-returns-nonnull.c
index e4e20b8..d7f39be 100644
--- gcc/testsuite/gcc.dg/attr-returns-nonnull.c
+++ gcc/testsuite/gcc.dg/attr-returns-nonnull.c
@@ -1,7 +1,8 @@
/* Verify that attribute returns_nonnull on global and local function
declarations is merged.
{ dg-do compile }
- { dg-options "-Wall -fdump-tree-optimized -fdelete-null-pointer-checks" } */
+ { dg-options "-Wall -fdump-tree-optimized -fdelete-null-pointer-checks" }
+ { dg-skip-if "" keeps_null_pointer_checks } */
void foo (void);
diff --git gcc/testsuite/gcc.dg/init-compare-1.c gcc/testsuite/gcc.dg/init-compare-1.c
index 6737c85..a473f59 100644
--- gcc/testsuite/gcc.dg/init-compare-1.c
+++ gcc/testsuite/gcc.dg/init-compare-1.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-additional-options "-fdelete-null-pointer-checks" } */
+/* { dg-skip-if "" keeps_null_pointer_checks } */
extern int a, b;
int c = &a == &a;
diff --git gcc/testsuite/gcc.dg/ipa/pr85734.c gcc/testsuite/gcc.dg/ipa/pr85734.c
index cbd524b..b3f5c81 100644
--- gcc/testsuite/gcc.dg/ipa/pr85734.c
+++ gcc/testsuite/gcc.dg/ipa/pr85734.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -Wsuggest-attribute=malloc -fdelete-null-pointer-checks" } */
+/* { dg-skip-if "" keeps_null_pointer_checks } */
__attribute__((noinline))
static void *f1(__SIZE_TYPE__ sz) /* { dg-bogus "function might be candidate for attribute 'malloc'" } */
diff --git gcc/testsuite/gcc.dg/ipa/propmalloc-1.c gcc/testsuite/gcc.dg/ipa/propmalloc-1.c
index d7c13af..f5e8676 100644
--- gcc/testsuite/gcc.dg/ipa/propmalloc-1.c
+++ gcc/testsuite/gcc.dg/ipa/propmalloc-1.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-ipa-pure-const-details -fdelete-null-pointer-checks" } */
+/* { dg-skip-if "" keeps_null_pointer_checks } */
__attribute__((noinline, no_icf, used))
static void *f(__SIZE_TYPE__ n)
diff --git gcc/testsuite/gcc.dg/ipa/propmalloc-2.c gcc/testsuite/gcc.dg/ipa/propmalloc-2.c
index 2332d9a..e26af41 100644
--- gcc/testsuite/gcc.dg/ipa/propmalloc-2.c
+++ gcc/testsuite/gcc.dg/ipa/propmalloc-2.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-ipa-pure-const-details -fdelete-null-pointer-checks" } */
+/* { dg-skip-if "" keeps_null_pointer_checks } */
__attribute__((noinline, used, no_icf))
static void *foo (__SIZE_TYPE__ n)
diff --git gcc/testsuite/gcc.dg/ipa/propmalloc-3.c gcc/testsuite/gcc.dg/ipa/propmalloc-3.c
index 5386695..3329a99 100644
--- gcc/testsuite/gcc.dg/ipa/propmalloc-3.c
+++ gcc/testsuite/gcc.dg/ipa/propmalloc-3.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-ipa-pure-const-details -fdelete-null-pointer-checks" } */
+/* { dg-skip-if "" keeps_null_pointer_checks } */
static void *foo(__SIZE_TYPE__, int) __attribute__((noinline, no_icf, used));
diff --git gcc/testsuite/gcc.dg/ipa/propmalloc-4.c gcc/testsuite/gcc.dg/ipa/propmalloc-4.c
index 9552b73..23566e6 100644
--- gcc/testsuite/gcc.dg/ipa/propmalloc-4.c
+++ gcc/testsuite/gcc.dg/ipa/propmalloc-4.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-local-pure-const-details -fdelete-null-pointer-checks" } */
+/* { dg-skip-if "" keeps_null_pointer_checks } */
void *foo(int cond1, int cond2, int cond3)
{
diff --git gcc/testsuite/gcc.dg/tree-ssa/evrp11.c gcc/testsuite/gcc.dg/tree-ssa/evrp11.c
index d791305..018aded 100644
--- gcc/testsuite/gcc.dg/tree-ssa/evrp11.c
+++ gcc/testsuite/gcc.dg/tree-ssa/evrp11.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-evrp -fdelete-null-pointer-checks" } */
+/* { dg-skip-if "" keeps_null_pointer_checks } */
extern void link_error ();
diff --git gcc/testsuite/gcc.dg/tree-ssa/pr83648.c gcc/testsuite/gcc.dg/tree-ssa/pr83648.c
index 954eb2f..d3dd12d 100644
--- gcc/testsuite/gcc.dg/tree-ssa/pr83648.c
+++ gcc/testsuite/gcc.dg/tree-ssa/pr83648.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-local-pure-const-details -fdelete-null-pointer-checks" } */
+/* { dg-skip-if "" keeps_null_pointer_checks } */
void *g(unsigned n)
{,
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Testsuite] Skip -fdelete-null-pointer-check tests if target keeps_null_pointer_checks
2023-05-15 5:06 [Testsuite] Skip -fdelete-null-pointer-check tests if target keeps_null_pointer_checks SenthilKumar.Selvaraj
@ 2023-05-16 4:34 ` Jeff Law
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2023-05-16 4:34 UTC (permalink / raw)
To: SenthilKumar.Selvaraj, gcc-patches; +Cc: ro, mikestump
On 5/14/23 23:06, SenthilKumar.Selvaraj--- via Gcc-patches wrote:
> Hi,
>
> When running regression tests related to https://gcc.gnu.org/pipermail/gcc-patches/2023-April/616772.html,
> I noticed a bunch of failures because some tests explicitly pass in
> -fdelete-null-pointer-checks, even if the target is configured to keep them.
>
> This patch skips such failing tests by adding a dg-skip-if for keeps_null_pointer_checks.
> Ok to commit?
>
> Regards
> Senthil
>
> gcc/testsuite/ChangeLog:
>
> * gcc.dg/attr-returns-nonnull.c: Skip if
> keeps_null_pointer_checks.
> * gcc.dg/init-compare-1.c: Likewise.
> * gcc.dg/ipa/pr85734.c: Likewise.
> * gcc.dg/ipa/propmalloc-1.c: Likewise.
> * gcc.dg/ipa/propmalloc-2.c: Likewise.
> * gcc.dg/ipa/propmalloc-3.c: Likewise.
> * gcc.dg/ipa/propmalloc-4.c: Likewise.
> * gcc.dg/tree-ssa/evrp11.c: Likewise.
> * gcc.dg/tree-ssa/pr83648.c: Likewise.
OK.
jeff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-16 4:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-15 5:06 [Testsuite] Skip -fdelete-null-pointer-check tests if target keeps_null_pointer_checks SenthilKumar.Selvaraj
2023-05-16 4:34 ` Jeff Law
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).