diff options
-rw-r--r-- | compiler-rt/lib/ubsan/ubsan_value.cc | 4 | ||||
-rw-r--r-- | compiler-rt/test/ubsan/TestCases/Float/cast-overflow.cpp | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/compiler-rt/lib/ubsan/ubsan_value.cc b/compiler-rt/lib/ubsan/ubsan_value.cc index 72faf2ee14b..466834c09ed 100644 --- a/compiler-rt/lib/ubsan/ubsan_value.cc +++ b/compiler-rt/lib/ubsan/ubsan_value.cc @@ -83,12 +83,12 @@ FloatMax Value::getFloatValue() const { #endif case 32: { float Value; -#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +#if defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ // For big endian the float value is in the last 4 bytes. // On some targets we may only have 4 bytes so we count backwards from // the end of Val to account for both the 32-bit and 64-bit cases. internal_memcpy(&Value, ((const char*)(&Val + 1)) - 4, 4); -#else +#else internal_memcpy(&Value, &Val, 4); #endif return Value; diff --git a/compiler-rt/test/ubsan/TestCases/Float/cast-overflow.cpp b/compiler-rt/test/ubsan/TestCases/Float/cast-overflow.cpp index e833d9fc948..5f51553f4e4 100644 --- a/compiler-rt/test/ubsan/TestCases/Float/cast-overflow.cpp +++ b/compiler-rt/test/ubsan/TestCases/Float/cast-overflow.cpp @@ -11,9 +11,6 @@ // FIXME: not %run %t 8 2>&1 | FileCheck %s --check-prefix=CHECK-8 // RUN: not %run %t 9 2>&1 | FileCheck %s --check-prefix=CHECK-9 -// FIXME: http://llvm.org/PR26919 -// XFAIL: win32 - // This test assumes float and double are IEEE-754 single- and double-precision. #if defined(__APPLE__) |