Fix UB in SIMD tests.
authorEric Fiselier <eric@efcs.ca>
Sat, 22 Sep 2018 20:09:02 +0000 (20:09 +0000)
committerEric Fiselier <eric@efcs.ca>
Sat, 22 Sep 2018 20:09:02 +0000 (20:09 +0000)
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.

llvm-svn: 342820

libcxx/test/std/experimental/simd/simd.access/default.pass.cpp

index 6ce32ca..d799675 100644 (file)
@@ -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;