[libc++] Fix some constexpr tests broken by D68837
authorLouis Dionne <ldionne@apple.com>
Wed, 6 Nov 2019 14:52:26 +0000 (14:52 +0000)
committerLouis Dionne <ldionne@apple.com>
Thu, 7 Nov 2019 12:29:17 +0000 (12:29 +0000)
This doesn't fix all the issues with D68837

libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/copy.pass.cpp
libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/copy_backward.pass.cpp
libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp
libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/copy_n.pass.cpp

index cc99859..2cdd3b9 100644 (file)
@@ -23,7 +23,7 @@ TEST_CONSTEXPR_CXX20 void
 test_copy()
 {
     const unsigned N = 1000;
-    int ia[N];
+    int ia[N] = {};
     for (unsigned i = 0; i < N; ++i)
         ia[i] = i;
     int ib[N] = {0};
index 0678257..6eb403d 100644 (file)
@@ -25,7 +25,7 @@ TEST_CONSTEXPR_CXX20 void
 test_copy_backward()
 {
     const unsigned N = 1000;
-    int ia[N];
+    int ia[N] = {};
     for (unsigned i = 0; i < N; ++i)
         ia[i] = i;
     int ib[N] = {0};
index 407e18f..a5e971c 100644 (file)
@@ -30,7 +30,7 @@ TEST_CONSTEXPR_CXX20 void
 test_copy_if()
 {
     const unsigned N = 1000;
-    int ia[N];
+    int ia[N] = {};
     for (unsigned i = 0; i < N; ++i)
         ia[i] = i;
     int ib[N] = {0};
index 179e4f1..72c22b5 100644 (file)
@@ -26,7 +26,7 @@ TEST_CONSTEXPR_CXX20 void
 test_copy_n()
 {
     const unsigned N = 1000;
-    int ia[N];
+    int ia[N] = {};
     for (unsigned i = 0; i < N; ++i)
         ia[i] = i;
     int ib[N] = {0};