]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Testsuite: Make dependence on -fdelete-null-pointer-checks explicit
authorSandra Loosemore <sandra@codesourcery.com>
Sun, 9 Jan 2022 06:02:13 +0000 (22:02 -0800)
committerSandra Loosemore <sandra@codesourcery.com>
Sun, 9 Jan 2022 06:17:18 +0000 (22:17 -0800)
nios2-elf target defaults to -fno-delete-null-pointer-checks, breaking
tests that implicitly depend on that optimization.  Add the option
explicitly on these tests.

2022-01-08  Sandra Loosemore  <sandra@codesourcery.com>

gcc/testsuite/
* g++.dg/cpp0x/constexpr-compare1.C: Add explicit
-fdelete-null-pointer-checks option.
* g++.dg/cpp0x/constexpr-compare2.C: Likewise.
* g++.dg/cpp0x/constexpr-typeid2.C: Likewise.
* g++.dg/cpp1y/constexpr-94716.C: Likewise.
* g++.dg/cpp1z/constexpr-compare1.C: Likewise.
* g++.dg/cpp1z/constexpr-if36.C: Likewise.
* gcc.dg/init-compare-1.c: Likewise.

libstdc++-v3/
* testsuite/18_support/type_info/constexpr.cc: Add explicit
-fdelete-null-pointer-checks option.

gcc/testsuite/g++.dg/cpp0x/constexpr-compare1.C
gcc/testsuite/g++.dg/cpp0x/constexpr-compare2.C
gcc/testsuite/g++.dg/cpp0x/constexpr-typeid2.C
gcc/testsuite/g++.dg/cpp1y/constexpr-94716.C
gcc/testsuite/g++.dg/cpp1z/constexpr-compare1.C
gcc/testsuite/g++.dg/cpp1z/constexpr-if36.C
gcc/testsuite/gcc.dg/init-compare-1.c
libstdc++-v3/testsuite/18_support/type_info/constexpr.cc

index ad65019079e40911a1bd92ab4338c2789c354f2b..603c6d5b2e6eb940652dae84a907ec24daaf6830 100644 (file)
@@ -1,4 +1,5 @@
 // { dg-do compile { target c++11 } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
 
 extern int a, b;
 static_assert (&a == &a, "");
index b1bc47208055570bd345f8f2cfc15eb535eaa533..5c08dbbd54fc3706f7d982191579a60f6011b708 100644 (file)
@@ -1,5 +1,6 @@
 // PR c++/69681
 // { dg-do compile { target c++11 } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
 
 void f();
 void g();
index 78c6b8e9a2ce9be18f3cd44c1650e225e567a9b7..8ab76f972d8271e6afd8e0448ef96f373cfb8828 100644 (file)
@@ -1,5 +1,6 @@
 // PR c++/103600
 // { dg-do compile { target c++11 } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
 
 #include <typeinfo>
 
index 90173f366d60a46ee0d7970abc4eb8f88520feea..5ac8720e93aa569fc4f03702d79c9e50c4f4206e 100644 (file)
@@ -1,5 +1,6 @@
 // PR c++/94716
 // { dg-do compile { target c++14 } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
 
 template <int> char v = 0;
 static_assert (&v<2> == &v<2>, "");
index a53c03c296807332722c475480fa71c52c326843..d40d5363b288739b140cdf29a5d77ef207a63a81 100644 (file)
@@ -1,4 +1,5 @@
 // { dg-do compile { target c++17 } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
 
 inline int a = 0;
 inline int b = 0;
index 4a1b134cc1939701d7871da92ccf0860d590a7b2..e425af291e3020c7deec3334f32f7bf84537e3b6 100644 (file)
@@ -3,6 +3,7 @@
 // weakness.
 
 // { dg-do compile { target c++17 } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
 
 extern void weakfn1 (void);
 extern void weakfn2 (void);
index 9208b666cff857647cfee57a64ec38338e553200..6737c85a840b6babf4d43e3ba59faef48dcc3937 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-additional-options "-fdelete-null-pointer-checks" } */
 
 extern int a, b;
 int c = &a == &a;
index 07f4fb651f4d5805e51e36017f9f88001810b9fb..6fb67b43f177bf970af6099dfa1f05293c289692 100644 (file)
@@ -1,5 +1,6 @@
 // { dg-options "-std=gnu++23 -frtti" }
 // { dg-do compile { target c++23 } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
 
 #include <typeinfo>