diff options
author | Sandra Loosemore <sandra@codesourcery.com> | 2022-01-08 22:02:13 -0800 |
---|---|---|
committer | Sandra Loosemore <sandra@codesourcery.com> | 2022-01-08 22:17:18 -0800 |
commit | 57fe1f6ad36dec80c02a9fb976ddcf038679cbf0 (patch) | |
tree | e7826858a363318b088316483ac211f633be5d67 /gcc | |
parent | 2848ef14117d71d76a9d6810b581b5da30455004 (diff) | |
download | gcc-57fe1f6ad36dec80c02a9fb976ddcf038679cbf0.zip gcc-57fe1f6ad36dec80c02a9fb976ddcf038679cbf0.tar.gz gcc-57fe1f6ad36dec80c02a9fb976ddcf038679cbf0.tar.bz2 |
Testsuite: Make dependence on -fdelete-null-pointer-checks explicit
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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/constexpr-compare1.C | 1 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/constexpr-compare2.C | 1 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/constexpr-typeid2.C | 1 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp1y/constexpr-94716.C | 1 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp1z/constexpr-compare1.C | 1 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp1z/constexpr-if36.C | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/init-compare-1.c | 1 |
7 files changed, 7 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-compare1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-compare1.C index ad650190..603c6d5 100644 --- a/gcc/testsuite/g++.dg/cpp0x/constexpr-compare1.C +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-compare1.C @@ -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, ""); diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-compare2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-compare2.C index b1bc472..5c08dbb 100644 --- a/gcc/testsuite/g++.dg/cpp0x/constexpr-compare2.C +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-compare2.C @@ -1,5 +1,6 @@ // PR c++/69681 // { dg-do compile { target c++11 } } +// { dg-additional-options "-fdelete-null-pointer-checks" } void f(); void g(); diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-typeid2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-typeid2.C index 78c6b8e..8ab76f9 100644 --- a/gcc/testsuite/g++.dg/cpp0x/constexpr-typeid2.C +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-typeid2.C @@ -1,5 +1,6 @@ // PR c++/103600 // { dg-do compile { target c++11 } } +// { dg-additional-options "-fdelete-null-pointer-checks" } #include <typeinfo> diff --git a/gcc/testsuite/g++.dg/cpp1y/constexpr-94716.C b/gcc/testsuite/g++.dg/cpp1y/constexpr-94716.C index 90173f3..5ac8720 100644 --- a/gcc/testsuite/g++.dg/cpp1y/constexpr-94716.C +++ b/gcc/testsuite/g++.dg/cpp1y/constexpr-94716.C @@ -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>, ""); diff --git a/gcc/testsuite/g++.dg/cpp1z/constexpr-compare1.C b/gcc/testsuite/g++.dg/cpp1z/constexpr-compare1.C index a53c03c..d40d536 100644 --- a/gcc/testsuite/g++.dg/cpp1z/constexpr-compare1.C +++ b/gcc/testsuite/g++.dg/cpp1z/constexpr-compare1.C @@ -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; diff --git a/gcc/testsuite/g++.dg/cpp1z/constexpr-if36.C b/gcc/testsuite/g++.dg/cpp1z/constexpr-if36.C index 4a1b134..e425af2 100644 --- a/gcc/testsuite/g++.dg/cpp1z/constexpr-if36.C +++ b/gcc/testsuite/g++.dg/cpp1z/constexpr-if36.C @@ -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); diff --git a/gcc/testsuite/gcc.dg/init-compare-1.c b/gcc/testsuite/gcc.dg/init-compare-1.c index 9208b66..6737c85 100644 --- a/gcc/testsuite/gcc.dg/init-compare-1.c +++ b/gcc/testsuite/gcc.dg/init-compare-1.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-fdelete-null-pointer-checks" } */ extern int a, b; int c = &a == &a; |