public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: <SenthilKumar.Selvaraj@microchip.com>
To: <gcc-patches@gcc.gnu.org>
Cc: <ro@CeBiTec.Uni-Bielefeld.DE>, <mikestump@comcast.net>
Subject: [Testsuite] Skip -fdelete-null-pointer-check tests if target keeps_null_pointer_checks
Date: Mon, 15 May 2023 05:06:03 +0000	[thread overview]
Message-ID: <595B4378-CEDC-4D6D-A6B1-7FF80AFEF7B0@microchip.com> (raw)

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)
 {,


             reply	other threads:[~2023-05-15  5:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-15  5:06 SenthilKumar.Selvaraj [this message]
2023-05-16  4:34 ` Jeff Law

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=595B4378-CEDC-4D6D-A6B1-7FF80AFEF7B0@microchip.com \
    --to=senthilkumar.selvaraj@microchip.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mikestump@comcast.net \
    --cc=ro@CeBiTec.Uni-Bielefeld.DE \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).