[committed,testsuite,MSP430,2/4] Skip tests requiring -fdelete-null-pointer-checks for targets which don't support this flag

Message ID 46df29a5-8472-0ceb-8e70-4bad5e02cbd5@mittosystems.com
State New
Headers show
Series
  • "Obvious" fixes to GCC tests for msp430-elf
Related show

Commit Message

Jozef Lawrynowicz Nov. 8, 2018, 4:47 p.m.
Patch 2 skips tests expecting NULL pointer checks to be deleted
with the -fdelete-null-pointer-checks flag, for targets which ignore this flag.

Patch

From 55b405a4d2c694ffdbcbd6808e139d88cb2d2447 Mon Sep 17 00:00:00 2001
From: Jozef Lawrynowicz <jozef.l@mittosystems.com>
Date: Tue, 6 Nov 2018 12:59:33 +0000
Subject: [PATCH 2/4] [TESTSUITE] nullptr checks

2018-11-08  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

	gcc/testsuite/ChangeLog:

	* c-c++-common/pr27336.c: Skip test if the target keeps null pointer
	checks.
	* gcc.dg/addr_equal-1.c: Likewise.
	* gcc.dg/tree-ssa/pr78154.c: Likewise.
	* gcc.dg/tree-ssa/vrp111.c: Likewise.
---
 gcc/testsuite/c-c++-common/pr27336.c    | 1 +
 gcc/testsuite/gcc.dg/addr_equal-1.c     | 1 +
 gcc/testsuite/gcc.dg/tree-ssa/pr78154.c | 1 +
 gcc/testsuite/gcc.dg/tree-ssa/vrp111.c  | 1 +
 4 files changed, 4 insertions(+)

diff --git a/gcc/testsuite/c-c++-common/pr27336.c b/gcc/testsuite/c-c++-common/pr27336.c
index ce68559..4ecc232 100644
--- a/gcc/testsuite/c-c++-common/pr27336.c
+++ b/gcc/testsuite/c-c++-common/pr27336.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O2 -fdelete-null-pointer-checks -fdump-tree-vrp1" } */
+/* { dg-skip-if "" { keeps_null_pointer_checks } } */
 
 struct B { int x; };
 extern void g3(struct B *that)  __attribute__((nonnull));
diff --git a/gcc/testsuite/gcc.dg/addr_equal-1.c b/gcc/testsuite/gcc.dg/addr_equal-1.c
index 70fa354..18b0dc9 100644
--- a/gcc/testsuite/gcc.dg/addr_equal-1.c
+++ b/gcc/testsuite/gcc.dg/addr_equal-1.c
@@ -4,6 +4,7 @@ 
 /* { dg-require-alias "" } */
 /* { dg-options "-O2 -fdelete-null-pointer-checks" } */
 /* { dg-skip-if "" { powerpc-ibm-aix* } } */
+/* { dg-skip-if "function pointers can be NULL" { keeps_null_pointer_checks } } */
 void abort (void);
 extern int undef_var0, undef_var1;
 extern __attribute__ ((weak)) int weak_undef_var0;
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr78154.c b/gcc/testsuite/gcc.dg/tree-ssa/pr78154.c
index b561503..3ba8f64 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr78154.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr78154.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O2 -fdump-tree-evrp-slim -fdelete-null-pointer-checks" } */
+/* { dg-skip-if "" { keeps_null_pointer_checks } } */
 
 void f(void *d, const void *s, __SIZE_TYPE__ n)
 {
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp111.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp111.c
index 6314423..cae2bc7 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/vrp111.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp111.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 } } */
 
 void foo (void *p) __attribute__((nonnull(1)));
 
-- 
2.7.4