+2020-01-24 Sandra Loosemore <sandra@codesourcery.com>
+
+ * g++.dg/cpp0x/constexpr-odr1.C: Add -fdelete-null-pointer-checks.
+ * g++.dg/cpp0x/constexpr-odr2.C: Likewise.
+ * g++.dg/cpp0x/nontype4.C: Likewise.
+ * g++.dg/cpp1y/constexpr-new.C: Likewise.
+ * g++.dg/cpp1y/new1.C: Likewise.
+ * g++.dg/cpp1y/new2.C: Likewise.
+ * g++.dg/cpp2a/constexpr-dynamic11.C: Likewise.
+ * g++.dg/cpp2a/constexpr-dynamic17.C: Likewise.
+ * g++.dg/cpp2a/constexpr-dynamic4.C: Likewise.
+ * g++.dg/cpp2a/constexpr-new1.C: Likewise.
+ * g++.dg/cpp2a/constexpr-new10.C: Likewise.
+ * g++.dg/cpp2a/constexpr-new2.C: Likewise.
+ * g++.dg/cpp2a/constexpr-new3.C: Likewise.
+ * g++.dg/cpp2a/constexpr-new4.C: Likewise.
+ * g++.dg/cpp2a/constexpr-new8.C: Likewise.
+ * g++.dg/cpp2a/constexpr-new9.C: Likewise.
+ * g++.dg/cpp2a/nontype-class1.C: Likewise.
+
2020-01-24 Jason Merrill <jason@redhat.com>
* lib/target-supports.exp (check_effective_target_unsigned_char):
// PR c++/92062 - ODR-use ignored for static member of class template.
// { dg-do run { target c++11 } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
template<int> struct A {
static const bool x;
// PR c++/92062 - ODR-use ignored for static member of class template.
// { dg-do run { target c++11 } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
template<int> struct A {
static const bool x;
// PR c++/56428
// { dg-do compile { target c++11 } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
struct A { };
// { dg-do compile { target c++14 } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
constexpr int *f4(bool b) {
if (b) {
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-cddce-details" } */
+// { dg-additional-options "-fdelete-null-pointer-checks" }
#include <stdlib.h>
/* { dg-do compile } */
/* { dg-options "-O2 -std=c++17 -fdump-tree-cddce-details" } */
+/* { dg-additional-options "-fdelete-null-pointer-checks" } */
#include <cstdio>
#include <cstdlib>
// PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr.
// { dg-do compile { target c++2a } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
// dynamic_cast in a constructor.
// [class.cdtor]#6: "If the operand of the dynamic_cast refers to the object
// PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr.
// { dg-do compile { target c++2a } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
// dynamic_cast in a constructor.
// [class.cdtor]#6: "If the operand of the dynamic_cast refers to the object
// PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr.
// { dg-do compile { target c++2a } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
// From clang's constant-expression-cxx2a.cpp.
// P0784R7
// { dg-do compile { target c++2a } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
struct S { constexpr S () : s (5) {} constexpr S (int x) : s (x) {} int s; };
// PR c++/91369
// { dg-do compile { target c++2a } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
struct S {
constexpr S (int* i) : s{i} {}
// P0784R7
// { dg-do compile { target c++2a } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
template <int N>
constexpr bool
// P0784R7
// { dg-do compile { target c++2a } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
constexpr int *
f1 ()
// P0784R7
// { dg-do compile { target c++2a } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
struct S
{
// PR c++/91369
// { dg-do compile { target c++2a } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
struct A {
constexpr A () : p{new int} {}
// PR c++/91369
// { dg-do compile { target c++2a } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
struct S {
constexpr S (int *i) : i{i} {}
// { dg-do compile { target c++2a } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
struct A
{