diff gcc/testsuite/g++.dg/cpp1y/constexpr-new.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
line wrap: on
line diff
--- a/gcc/testsuite/g++.dg/cpp1y/constexpr-new.C	Thu Oct 25 07:37:49 2018 +0900
+++ b/gcc/testsuite/g++.dg/cpp1y/constexpr-new.C	Thu Feb 13 11:34:05 2020 +0900
@@ -1,11 +1,12 @@
 // { dg-do compile { target c++14 } }
+// { dg-additional-options "-fdelete-null-pointer-checks" }
 
 constexpr int *f4(bool b) {
   if (b) {
     return nullptr;
   } else {
-    return new int{42}; // { dg-error "call to non-.constexpr." }
-  }
+    return new int{42}; // { dg-error "call to non-.constexpr." "" { target c++17_down } }
+  }			// { dg-error "is not a constant expression because allocated storage has not been deallocated" "" { target c++2a } .-1 }
 }
 static_assert(f4(true) == nullptr, "");
 static_assert(f4(false) == nullptr, ""); // { dg-error "non-.constant. condition|" }