[libcxx] r342820 - Fix UB in SIMD tests.
Eric Fiselier
eric at efcs.ca
Sat Sep 22 13:09:02 PDT 2018
Author: ericwf
Date: Sat Sep 22 13:09:02 2018
New Revision: 342820
URL: http://llvm.org/viewvc/llvm-project?rev=342820&view=rev
Log:
Fix UB in SIMD tests.
One of the SIMD tests attempted to left shift a value by 42, which
is UB when the left hand side is a 32 bit integer type.
This patch adjusts the test to use the value 4 instead of 42.
Modified:
libcxx/trunk/test/std/experimental/simd/simd.access/default.pass.cpp
Modified: libcxx/trunk/test/std/experimental/simd/simd.access/default.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/simd/simd.access/default.pass.cpp?rev=342820&r1=342819&r2=342820&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/simd/simd.access/default.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/simd/simd.access/default.pass.cpp Sat Sep 22 13:09:02 2018
@@ -165,7 +165,7 @@ void test_access() {
}
{
auto c = a;
- (void)(a[0] + (c[0] <<= a[0]));
+ (void)(a[0] + (c[0] <<= b[0]));
}
{
auto c = a;
More information about the libcxx-commits
mailing list