diff mbox series

[committed,obvious] Add -fdelete-null-pointer-checks to more new C++ testcases.

Message ID 6ca003fe-2f04-5967-7a54-4a21613e6b18@codesourcery.com
State New
Headers show
Series [committed,obvious] Add -fdelete-null-pointer-checks to more new C++ testcases. | expand

Commit Message

Sandra Loosemore Feb. 13, 2020, 6:53 p.m. UTC
A few weeks ago I committed this patch to fix some problems I saw in 
nios2-elf testing:

https://gcc.gnu.org/ml/gcc-patches/2020-01/msg01385.html

Since then there have been some further new C++ constexpr testcases 
added that have the same problem with assuming 
-fdelete-null-pointer-checks.  I've committed the attached patch as an 
obvious followup to the last one.

-Sandra
diff mbox series

Patch

commit bb97ad35ead015075ee4747136c9fc75faa27411
Author: Sandra Loosemore <sandra@codesourcery.com>
Date:   Thu Feb 13 10:47:55 2020 -0800

    Add -fdelete-null-pointer-checks to more new C++ testcases.
    
    2020-02-13  Sandra Loosemore  <sandra@codesourcery.com>
    
    	gcc/testsuite/
    	* g++.dg/cpp0x/constexpr-static13.C:
    	Add -fdelete-null-pointer-checks.
    	* g++.dg/cpp2a/constexpr-new11.C: Likewise.
    	* g++.dg/cpp2a/constexpr-new12.C: Likewise.

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c296fc3..560187c 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,10 @@ 
+2020-02-13  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* g++.dg/cpp0x/constexpr-static13.C:
+	Add -fdelete-null-pointer-checks.
+	* g++.dg/cpp2a/constexpr-new11.C: Likewise.
+	* g++.dg/cpp2a/constexpr-new12.C: Likewise.
+
 2020-02-13  H.J. Lu  <hongjiu.lu@intel.com>
 
 	PR target/93656
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-static13.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-static13.C
index 644f9f7..2677a22 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-static13.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-static13.C
@@ -1,5 +1,6 @@ 
 // PR c++/92003
 // { dg-do compile { target c++11 } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
 // { dg-prune-output "narrowing conversion" }
 
 constexpr char const* get_c_str() { return "abc"; }
diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new11.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new11.C
index 26658d0..2bf359a 100644
--- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new11.C
+++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new11.C
@@ -1,5 +1,6 @@ 
 // PR c++/93633
 // { dg-do compile { target c++2a } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
 
 struct A {
   constexpr A () : a (0) {}
diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new12.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new12.C
index 2dedcd2..04f7597 100644
--- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new12.C
+++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new12.C
@@ -1,5 +1,6 @@ 
 // PR c++/93633
 // { dg-do compile { target c++2a } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
 
 struct A {
   constexpr A () : a (0) {}