Mark some test XFAIL for GCC 4.9 due to missing is_trivial* traits
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@258287 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/std/iterators/stream.iterators/istream.iterator/types.pass.cpp b/test/std/iterators/stream.iterators/istream.iterator/types.pass.cpp
index 85a70a0..1250e36 100644
--- a/test/std/iterators/stream.iterators/istream.iterator/types.pass.cpp
+++ b/test/std/iterators/stream.iterators/istream.iterator/types.pass.cpp
@@ -9,6 +9,9 @@
// <iterator>
+// Test fails due to use of is_trivially_* trait.
+// XFAIL: gcc-4.9
+
// template <class T, class charT = char, class traits = char_traits<charT>,
// class Distance = ptrdiff_t>
// class istream_iterator
diff --git a/test/std/iterators/stream.iterators/istreambuf.iterator/types.pass.cpp b/test/std/iterators/stream.iterators/istreambuf.iterator/types.pass.cpp
index 2ad927c..2507ae3 100644
--- a/test/std/iterators/stream.iterators/istreambuf.iterator/types.pass.cpp
+++ b/test/std/iterators/stream.iterators/istreambuf.iterator/types.pass.cpp
@@ -9,6 +9,9 @@
// <iterator>
+// Test fails due to use of is_trivially_* trait.
+// XFAIL: gcc-4.9
+
// template<class charT, class traits = char_traits<charT> >
// class istreambuf_iterator
// : public iterator<input_iterator_tag, charT,
diff --git a/test/std/language.support/support.types/nullptr_t.pass.cpp b/test/std/language.support/support.types/nullptr_t.pass.cpp
index 1cc2aa6..ca5170f 100644
--- a/test/std/language.support/support.types/nullptr_t.pass.cpp
+++ b/test/std/language.support/support.types/nullptr_t.pass.cpp
@@ -57,10 +57,14 @@
#pragma clang diagnostic ignored "-Wnull-conversion"
#endif
void test_nullptr_conversions() {
+// GCC does not accept this due to CWG Defect #1423
+// http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1423
+#if defined(__clang__)
{
bool b = nullptr;
assert(!b);
}
+#endif
{
bool b(nullptr);
assert(!b);
diff --git a/test/std/utilities/function.objects/refwrap/type_properties.pass.cpp b/test/std/utilities/function.objects/refwrap/type_properties.pass.cpp
index 61e0bfa..5a6a6fb 100644
--- a/test/std/utilities/function.objects/refwrap/type_properties.pass.cpp
+++ b/test/std/utilities/function.objects/refwrap/type_properties.pass.cpp
@@ -14,6 +14,9 @@
// Test that reference wrapper meets the requirements of TriviallyCopyable,
// CopyConstructible and CopyAssignable.
+// Test fails due to use of is_trivially_* trait.
+// XFAIL: gcc-4.9
+
#include <functional>
#include <type_traits>
#include <string>
diff --git a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_assignable.pass.cpp b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_assignable.pass.cpp
index 3ebb9db..a9b538b 100644
--- a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_assignable.pass.cpp
+++ b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_assignable.pass.cpp
@@ -11,6 +11,8 @@
// is_trivially_assignable
+// XFAIL: gcc-4.9
+
#include <type_traits>
#include "test_macros.h"
diff --git a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_assignable.pass.cpp b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_assignable.pass.cpp
index 25429f5..966573c 100644
--- a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_assignable.pass.cpp
+++ b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_assignable.pass.cpp
@@ -11,6 +11,8 @@
// is_trivially_copy_assignable
+// XFAIL: gcc-4.9
+
#include <type_traits>
#include "test_macros.h"
diff --git a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_constructible.pass.cpp b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_constructible.pass.cpp
index 9556959..2922f22 100644
--- a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_constructible.pass.cpp
+++ b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_constructible.pass.cpp
@@ -11,6 +11,8 @@
// is_trivially_copy_constructible
+// XFAIL: gcc-4.9
+
#include <type_traits>
#include "test_macros.h"
diff --git a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copyable.pass.cpp b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copyable.pass.cpp
index c19a29f..42ecdb3 100644
--- a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copyable.pass.cpp
+++ b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copyable.pass.cpp
@@ -11,6 +11,8 @@
// is_trivially_copyable
+// XFAIL: gcc-4.9
+
#include <type_traits>
#include <cassert>
#include "test_macros.h"
diff --git a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_assignable.pass.cpp b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_assignable.pass.cpp
index eca596e..9a27c73 100644
--- a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_assignable.pass.cpp
+++ b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_assignable.pass.cpp
@@ -11,6 +11,8 @@
// is_trivially_move_assignable
+// XFAIL: gcc-4.9
+
#include <type_traits>
#include "test_macros.h"
diff --git a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_constructible.pass.cpp b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_constructible.pass.cpp
index 313da17..941ff31 100644
--- a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_constructible.pass.cpp
+++ b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_constructible.pass.cpp
@@ -11,6 +11,8 @@
// is_trivially_move_constructible
+// XFAIL: gcc-4.9
+
#include <type_traits>
#include "test_macros.h"
@@ -60,7 +62,7 @@
A(const A&);
};
-#if __has_feature(cxx_defaulted_functions)
+#if TEST_STD_VER >= 11
struct MoveOnly1
{
@@ -89,7 +91,7 @@
test_is_trivially_move_constructible<const int*>();
test_is_trivially_move_constructible<bit_zero>();
-#if __has_feature(cxx_defaulted_functions)
+#if TEST_STD_VER >= 11
static_assert(!std::is_trivially_move_constructible<MoveOnly1>::value, "");
static_assert( std::is_trivially_move_constructible<MoveOnly2>::value, "");
#endif
diff --git a/test/std/utilities/utility/pairs/pairs.pair/copy_ctor.pass.cpp b/test/std/utilities/utility/pairs/pairs.pair/copy_ctor.pass.cpp
index 4b54f71..d16313f 100644
--- a/test/std/utilities/utility/pairs/pairs.pair/copy_ctor.pass.cpp
+++ b/test/std/utilities/utility/pairs/pairs.pair/copy_ctor.pass.cpp
@@ -13,9 +13,14 @@
// pair(const pair&) = default;
+// Doesn't pass due to use of is_trivially_* trait.
+// XFAIL: gcc-4.9
+
#include <utility>
#include <cassert>
+#include "test_macros.h"
+
int main()
{
{
@@ -28,7 +33,7 @@
static_assert((std::is_trivially_copy_constructible<std::pair<int, int> >::value), "");
-#if _LIBCPP_STD_VER > 11
+#if TEST_STD_VER > 11
{
typedef std::pair<int, short> P1;
constexpr P1 p1(3, 4);
diff --git a/test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp b/test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp
index d83328b..97182d2 100644
--- a/test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp
+++ b/test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp
@@ -13,9 +13,15 @@
// constexpr pair();
+// This test doesn't pass due to a constexpr bug in GCC 4.9 that fails
+// to initialize any type without a user provided constructor in a constant
+// expression (ie float).
+// XFAIL: gcc-4.9
+
// NOTE: The SFINAE on the default constructor is tested in
// default-sfinae.pass.cpp
+
#include <utility>
#include <type_traits>
#include <cassert>