aboutsummaryrefslogtreecommitdiff
path: root/test/std/language.support/support.dynamic
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/language.support/support.dynamic')
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp28
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp23
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp22
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp24
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.sh.cpp (renamed from test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.fail.cpp)7
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.sh.cpp26
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.sh.cpp (renamed from test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.fail.cpp)7
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.sh.cpp (renamed from test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.fail.cpp)7
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp28
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp22
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp22
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp24
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.fail.cpp25
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.sh.cpp (renamed from test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.fail.cpp)9
-rw-r--r--test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.sh.cpp (renamed from test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.fail.cpp)7
15 files changed, 185 insertions, 96 deletions
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp
index 2175e29a040d..52aeea314dd5 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp
@@ -12,17 +12,27 @@
// UNSUPPORTED: sanitizer-new-delete, c++98, c++03, c++11, c++14
// Older Clang versions do not support this
-// XFAIL: clang-3, apple-clang-7, apple-clang-8
+// UNSUPPORTED: clang-3, apple-clang-7, apple-clang-8
// None of the current GCC compilers support this.
-// XFAIL: gcc-5, gcc-6
-
-// XFAIL: with_system_cxx_lib=macosx10.12
-// XFAIL: with_system_cxx_lib=macosx10.11
-// XFAIL: with_system_cxx_lib=macosx10.10
-// XFAIL: with_system_cxx_lib=macosx10.9
-// XFAIL: with_system_cxx_lib=macosx10.7
-// XFAIL: with_system_cxx_lib=macosx10.8
+// UNSUPPORTED: gcc-5, gcc-6
+
+// dylibs shipped before macosx10.13 do not provide aligned allocation, so that's a link error
+// UNSUPPORTED: with_system_cxx_lib=macosx10.12
+// UNSUPPORTED: with_system_cxx_lib=macosx10.11
+// UNSUPPORTED: with_system_cxx_lib=macosx10.10
+// UNSUPPORTED: with_system_cxx_lib=macosx10.9
+// UNSUPPORTED: with_system_cxx_lib=macosx10.8
+// UNSUPPORTED: with_system_cxx_lib=macosx10.7
+
+// Using aligned allocation functions is a compiler error when deploying to
+// platforms older than macosx10.13
+// UNSUPPORTED: macosx10.12
+// UNSUPPORTED: macosx10.11
+// UNSUPPORTED: macosx10.10
+// UNSUPPORTED: macosx10.9
+// UNSUPPORTED: macosx10.8
+// UNSUPPORTED: macosx10.7
// On Windows libc++ doesn't provide its own definitions for new/delete
// but instead depends on the ones in VCRuntime. However VCRuntime does not
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp
index 942f5e778b66..1d20b33a0df2 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp
@@ -15,13 +15,22 @@
// FIXME change this to XFAIL.
// UNSUPPORTED: no-aligned-allocation && !gcc
-// XFAIL: with_system_cxx_lib=macosx10.12
-// XFAIL: with_system_cxx_lib=macosx10.11
-// XFAIL: with_system_cxx_lib=macosx10.10
-// XFAIL: with_system_cxx_lib=macosx10.9
-// XFAIL: with_system_cxx_lib=macosx10.7
-// XFAIL: with_system_cxx_lib=macosx10.8
-
+// dylibs shipped before macosx10.13 do not provide aligned allocation, so that's a link error
+// UNSUPPORTED: with_system_cxx_lib=macosx10.12
+// UNSUPPORTED: with_system_cxx_lib=macosx10.11
+// UNSUPPORTED: with_system_cxx_lib=macosx10.10
+// UNSUPPORTED: with_system_cxx_lib=macosx10.9
+// UNSUPPORTED: with_system_cxx_lib=macosx10.8
+// UNSUPPORTED: with_system_cxx_lib=macosx10.7
+
+// Using aligned allocation functions is a compiler error when deploying to
+// platforms older than macosx10.13
+// UNSUPPORTED: macosx10.12
+// UNSUPPORTED: macosx10.11
+// UNSUPPORTED: macosx10.10
+// UNSUPPORTED: macosx10.9
+// UNSUPPORTED: macosx10.8
+// UNSUPPORTED: macosx10.7
// On Windows libc++ doesn't provide its own definitions for new/delete
// but instead depends on the ones in VCRuntime. However VCRuntime does not
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp
index f55ad5bcc84e..60ebdd8e9457 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp
@@ -15,12 +15,22 @@
// FIXME turn this into an XFAIL
// UNSUPPORTED: no-aligned-allocation && !gcc
-// XFAIL: with_system_cxx_lib=macosx10.12
-// XFAIL: with_system_cxx_lib=macosx10.11
-// XFAIL: with_system_cxx_lib=macosx10.10
-// XFAIL: with_system_cxx_lib=macosx10.9
-// XFAIL: with_system_cxx_lib=macosx10.7
-// XFAIL: with_system_cxx_lib=macosx10.8
+// dylibs shipped before macosx10.13 do not provide aligned allocation, so that's a link error
+// UNSUPPORTED: with_system_cxx_lib=macosx10.12
+// UNSUPPORTED: with_system_cxx_lib=macosx10.11
+// UNSUPPORTED: with_system_cxx_lib=macosx10.10
+// UNSUPPORTED: with_system_cxx_lib=macosx10.9
+// UNSUPPORTED: with_system_cxx_lib=macosx10.8
+// UNSUPPORTED: with_system_cxx_lib=macosx10.7
+
+// Using aligned allocation functions is a compiler error when deploying to
+// platforms older than macosx10.13
+// UNSUPPORTED: macosx10.12
+// UNSUPPORTED: macosx10.11
+// UNSUPPORTED: macosx10.10
+// UNSUPPORTED: macosx10.9
+// UNSUPPORTED: macosx10.8
+// UNSUPPORTED: macosx10.7
// On Windows libc++ doesn't provide its own definitions for new/delete
// but instead depends on the ones in VCRuntime. However VCRuntime does not
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp
index e1ebf86ee176..b09316487f90 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp
@@ -10,12 +10,24 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
// UNSUPPORTED: sanitizer-new-delete
-// XFAIL: with_system_cxx_lib=macosx10.12
-// XFAIL: with_system_cxx_lib=macosx10.11
-// XFAIL: with_system_cxx_lib=macosx10.10
-// XFAIL: with_system_cxx_lib=macosx10.9
-// XFAIL: with_system_cxx_lib=macosx10.7
-// XFAIL: with_system_cxx_lib=macosx10.8
+// dylibs shipped before macosx10.13 do not provide aligned allocation, so our
+// custom aligned allocation functions are not called and the test fails
+// UNSUPPORTED: with_system_cxx_lib=macosx10.12
+// UNSUPPORTED: with_system_cxx_lib=macosx10.11
+// UNSUPPORTED: with_system_cxx_lib=macosx10.10
+// UNSUPPORTED: with_system_cxx_lib=macosx10.9
+// UNSUPPORTED: with_system_cxx_lib=macosx10.8
+// UNSUPPORTED: with_system_cxx_lib=macosx10.7
+
+// Our custom aligned allocation functions are not called when deploying to
+// platforms older than macosx10.13, since those platforms don't support
+// aligned allocation.
+// UNSUPPORTED: macosx10.12
+// UNSUPPORTED: macosx10.11
+// UNSUPPORTED: macosx10.10
+// UNSUPPORTED: macosx10.9
+// UNSUPPORTED: macosx10.8
+// UNSUPPORTED: macosx10.7
// XFAIL: no-aligned-allocation && !gcc
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.fail.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.sh.cpp
index 0dfef2e56fca..40632a1bd49b 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.fail.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.sh.cpp
@@ -15,11 +15,12 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8
-#include <new>
+// REQUIRES: -faligned-allocation
+// RUN: %compile %verify -faligned-allocation
-#include "test_macros.h"
+#include <new>
int main ()
{
- ::operator new[](4); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}}
+ ::operator new[](4); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
}
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.sh.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.sh.cpp
new file mode 100644
index 000000000000..f7921d2f2c12
--- /dev/null
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.sh.cpp
@@ -0,0 +1,26 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <new>
+
+// void* operator new[](std::size_t, std::align_val_t);
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
+// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8
+
+// REQUIRES: -faligned-allocation
+// RUN: %compile %verify -faligned-allocation
+
+#include <new>
+
+int main ()
+{
+ ::operator new[](4, std::align_val_t{4}); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
+}
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.fail.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.sh.cpp
index 99e4f76b312f..130148786732 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.fail.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.sh.cpp
@@ -15,11 +15,12 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8
-#include <new>
+// REQUIRES: -faligned-allocation
+// RUN: %compile %verify -faligned-allocation
-#include "test_macros.h"
+#include <new>
int main ()
{
- ::operator new[](4, std::align_val_t{4}, std::nothrow); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}}
+ ::operator new[](4, std::align_val_t{4}, std::nothrow); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
}
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.fail.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.sh.cpp
index 8aae54e83fbe..43295a7e6932 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.fail.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.sh.cpp
@@ -15,11 +15,12 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8
-#include <new>
+// REQUIRES: -faligned-allocation
+// RUN: %compile %verify -faligned-allocation
-#include "test_macros.h"
+#include <new>
int main ()
{
- ::operator new[](4, std::nothrow); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}}
+ ::operator new[](4, std::nothrow); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
}
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp
index 6f1c7511243e..5885218c4661 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp
@@ -11,17 +11,27 @@
// UNSUPPORTED: sanitizer-new-delete, c++98, c++03, c++11, c++14
// Older Clang versions do not support this
-// XFAIL: clang-3, apple-clang-7, apple-clang-8
+// UNSUPPORTED: clang-3, apple-clang-7, apple-clang-8
// None of the current GCC compilers support this.
-// XFAIL: gcc-5, gcc-6
-
-// XFAIL: with_system_cxx_lib=macosx10.12
-// XFAIL: with_system_cxx_lib=macosx10.11
-// XFAIL: with_system_cxx_lib=macosx10.10
-// XFAIL: with_system_cxx_lib=macosx10.9
-// XFAIL: with_system_cxx_lib=macosx10.7
-// XFAIL: with_system_cxx_lib=macosx10.8
+// UNSUPPORTED: gcc-5, gcc-6
+
+// dylibs shipped before macosx10.13 do not provide aligned allocation, so that's a link error
+// UNSUPPORTED: with_system_cxx_lib=macosx10.12
+// UNSUPPORTED: with_system_cxx_lib=macosx10.11
+// UNSUPPORTED: with_system_cxx_lib=macosx10.10
+// UNSUPPORTED: with_system_cxx_lib=macosx10.9
+// UNSUPPORTED: with_system_cxx_lib=macosx10.8
+// UNSUPPORTED: with_system_cxx_lib=macosx10.7
+
+// Using aligned allocation functions is a compiler error when deploying to
+// platforms older than macosx10.13
+// UNSUPPORTED: macosx10.12
+// UNSUPPORTED: macosx10.11
+// UNSUPPORTED: macosx10.10
+// UNSUPPORTED: macosx10.9
+// UNSUPPORTED: macosx10.8
+// UNSUPPORTED: macosx10.7
// On Windows libc++ doesn't provide its own definitions for new/delete
// but instead depends on the ones in VCRuntime. However VCRuntime does not
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp
index fae5d3676df6..52db4c56ced4 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp
@@ -9,12 +9,22 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
-// XFAIL: with_system_cxx_lib=macosx10.12
-// XFAIL: with_system_cxx_lib=macosx10.11
-// XFAIL: with_system_cxx_lib=macosx10.10
-// XFAIL: with_system_cxx_lib=macosx10.9
-// XFAIL: with_system_cxx_lib=macosx10.7
-// XFAIL: with_system_cxx_lib=macosx10.8
+// dylibs shipped before macosx10.13 do not provide aligned allocation, so that's a link error
+// UNSUPPORTED: with_system_cxx_lib=macosx10.12
+// UNSUPPORTED: with_system_cxx_lib=macosx10.11
+// UNSUPPORTED: with_system_cxx_lib=macosx10.10
+// UNSUPPORTED: with_system_cxx_lib=macosx10.9
+// UNSUPPORTED: with_system_cxx_lib=macosx10.8
+// UNSUPPORTED: with_system_cxx_lib=macosx10.7
+
+// Using aligned allocation functions is a compiler error when deploying to
+// platforms older than macosx10.13
+// UNSUPPORTED: macosx10.12
+// UNSUPPORTED: macosx10.11
+// UNSUPPORTED: macosx10.10
+// UNSUPPORTED: macosx10.9
+// UNSUPPORTED: macosx10.8
+// UNSUPPORTED: macosx10.7
// asan and msan will not call the new handler.
// UNSUPPORTED: sanitizer-new-delete
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp
index f22c48994355..a5e40a0d28c8 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp
@@ -9,12 +9,22 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
-// XFAIL: with_system_cxx_lib=macosx10.12
-// XFAIL: with_system_cxx_lib=macosx10.11
-// XFAIL: with_system_cxx_lib=macosx10.10
-// XFAIL: with_system_cxx_lib=macosx10.9
-// XFAIL: with_system_cxx_lib=macosx10.7
-// XFAIL: with_system_cxx_lib=macosx10.8
+// dylibs shipped before macosx10.13 do not provide aligned allocation, so that's a link error
+// UNSUPPORTED: with_system_cxx_lib=macosx10.12
+// UNSUPPORTED: with_system_cxx_lib=macosx10.11
+// UNSUPPORTED: with_system_cxx_lib=macosx10.10
+// UNSUPPORTED: with_system_cxx_lib=macosx10.9
+// UNSUPPORTED: with_system_cxx_lib=macosx10.8
+// UNSUPPORTED: with_system_cxx_lib=macosx10.7
+
+// Using aligned allocation functions is a compiler error when deploying to
+// platforms older than macosx10.13
+// UNSUPPORTED: macosx10.12
+// UNSUPPORTED: macosx10.11
+// UNSUPPORTED: macosx10.10
+// UNSUPPORTED: macosx10.9
+// UNSUPPORTED: macosx10.8
+// UNSUPPORTED: macosx10.7
// asan and msan will not call the new handler.
// UNSUPPORTED: sanitizer-new-delete
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp
index 565ba9b851bb..de1bd8d82052 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp
@@ -10,12 +10,24 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
// UNSUPPORTED: sanitizer-new-delete
-// XFAIL: with_system_cxx_lib=macosx10.12
-// XFAIL: with_system_cxx_lib=macosx10.11
-// XFAIL: with_system_cxx_lib=macosx10.10
-// XFAIL: with_system_cxx_lib=macosx10.9
-// XFAIL: with_system_cxx_lib=macosx10.7
-// XFAIL: with_system_cxx_lib=macosx10.8
+// dylibs shipped before macosx10.13 do not provide aligned allocation, so our
+// custom aligned allocation functions are not called and the test fails
+// UNSUPPORTED: with_system_cxx_lib=macosx10.12
+// UNSUPPORTED: with_system_cxx_lib=macosx10.11
+// UNSUPPORTED: with_system_cxx_lib=macosx10.10
+// UNSUPPORTED: with_system_cxx_lib=macosx10.9
+// UNSUPPORTED: with_system_cxx_lib=macosx10.8
+// UNSUPPORTED: with_system_cxx_lib=macosx10.7
+
+// Our custom aligned allocation functions are not called when deploying to
+// platforms older than macosx10.13, since those platforms don't support
+// aligned allocation.
+// UNSUPPORTED: macosx10.12
+// UNSUPPORTED: macosx10.11
+// UNSUPPORTED: macosx10.10
+// UNSUPPORTED: macosx10.9
+// UNSUPPORTED: macosx10.8
+// UNSUPPORTED: macosx10.7
// NOTE: gcc doesn't provide -faligned-allocation flag to test for
// XFAIL: no-aligned-allocation && !gcc
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.fail.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.fail.cpp
deleted file mode 100644
index c3cabbdb79d5..000000000000
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.fail.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// -*- C++ -*-
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// <new>
-
-// void* operator new(std::size_t, std::align_val_t);
-
-// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
-// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8
-
-#include <new>
-
-#include "test_macros.h"
-
-int main ()
-{
- ::operator new(4, std::align_val_t{4}); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}}
-}
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.fail.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.sh.cpp
index ea041aea16ee..410c6d7748da 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.fail.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.sh.cpp
@@ -10,16 +10,17 @@
// <new>
-// void* operator new[](std::size_t, std::align_val_t);
+// void* operator new(std::size_t, std::align_val_t);
// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8
-#include <new>
+// REQUIRES: -faligned-allocation
+// RUN: %compile %verify -faligned-allocation
-#include "test_macros.h"
+#include <new>
int main ()
{
- ::operator new[](4, std::align_val_t{4}); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}}
+ ::operator new(4, std::align_val_t{4}); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
}
diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.fail.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.sh.cpp
index e987a53478b0..1fe104551e1b 100644
--- a/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.fail.cpp
+++ b/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.sh.cpp
@@ -15,11 +15,12 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8
-#include <new>
+// REQUIRES: -faligned-allocation
+// RUN: %compile %verify -faligned-allocation
-#include "test_macros.h"
+#include <new>
int main ()
{
- ::operator new(4, std::align_val_t{4}, std::nothrow); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}}
+ ::operator new(4, std::align_val_t{4}, std::nothrow); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
}