public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Sandra Loosemore <sandra@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-6385] Testsuite: Make dependence on -fdelete-null-pointer-checks explicit Date: Sun, 9 Jan 2022 06:18:26 +0000 (GMT) [thread overview] Message-ID: <20220109061826.83A2A3858401@sourceware.org> (raw) https://gcc.gnu.org/g:57fe1f6ad36dec80c02a9fb976ddcf038679cbf0 commit r12-6385-g57fe1f6ad36dec80c02a9fb976ddcf038679cbf0 Author: Sandra Loosemore <sandra@codesourcery.com> Date: Sat Jan 8 22:02:13 2022 -0800 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. Diff: --- gcc/testsuite/g++.dg/cpp0x/constexpr-compare1.C | 1 + gcc/testsuite/g++.dg/cpp0x/constexpr-compare2.C | 1 + gcc/testsuite/g++.dg/cpp0x/constexpr-typeid2.C | 1 + gcc/testsuite/g++.dg/cpp1y/constexpr-94716.C | 1 + gcc/testsuite/g++.dg/cpp1z/constexpr-compare1.C | 1 + gcc/testsuite/g++.dg/cpp1z/constexpr-if36.C | 1 + gcc/testsuite/gcc.dg/init-compare-1.c | 1 + libstdc++-v3/testsuite/18_support/type_info/constexpr.cc | 1 + 8 files changed, 8 insertions(+) diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-compare1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-compare1.C index ad65019079e..603c6d5b2e6 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 b1bc4720805..5c08dbbd54f 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 78c6b8e9a2c..8ab76f972d8 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 90173f366d6..5ac8720e93a 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 a53c03c2968..d40d5363b28 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 4a1b134cc19..e425af291e3 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 9208b666cff..6737c85a840 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; diff --git a/libstdc++-v3/testsuite/18_support/type_info/constexpr.cc b/libstdc++-v3/testsuite/18_support/type_info/constexpr.cc index 07f4fb651f4..6fb67b43f17 100644 --- a/libstdc++-v3/testsuite/18_support/type_info/constexpr.cc +++ b/libstdc++-v3/testsuite/18_support/type_info/constexpr.cc @@ -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>
reply other threads:[~2022-01-09 6:18 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220109061826.83A2A3858401@sourceware.org \ --to=sandra@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /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: linkBe 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).