Files
swift-mirror/test/stdlib/simd_diagnostics.swift
Butta 3933fc0006 [android][test] Fix several tests on the Android CI
- #58975 switched many tests from XFAIL on linux to linux-gnu, so seven
  fail on the Android CI and two natively. They are now explicitly excluded.
- #39605 added several C++ Interop tests, 11 of which fail on the Android CI,
  so disable them for now.
- #42478 removed the @noescape attribute for the non-Android
  SIL/clang-function-types tests, so I remove it for Android too.
- My pull #40779 moved the Swift pointer tags to the second byte, so
  SILOptimizer/concat_string_literals.64 will need to be updated for that,
  disabled it for now.
- Compiler-rt moved the directory in which it places those libraries for
  Android, llvm/llvm-project@a68ccba, so lit.cfg is updated for that.
2022-06-09 14:35:41 +05:30

21 lines
1.6 KiB
Swift

// RUN: %target-typecheck-verify-swift
// FIXME: No simd module on linux rdar://problem/20795411
// XFAIL: OS=linux-gnu, OS=windows-msvc, OS=openbsd, OS=linux-android, OS=linux-androideabi
// XFAIL: OS=wasi
import simd
let a = int4(0) + int4(0) // expected-error{{'+' is unavailable: integer vector types do not support checked arithmetic; use the wrapping operator '&+' instead}}
let b = int4(0) - int4(0) // expected-error{{'-' is unavailable: integer vector types do not support checked arithmetic; use the wrapping operator '&-' instead}}
let c = int4(0) * int4(0) // expected-error{{'*' is unavailable: integer vector types do not support checked arithmetic; use the wrapping operator '&*' instead}}
let x = int4(0) * (0 as Int32) // expected-error{{'*' is unavailable: integer vector types do not support checked arithmetic; use the wrapping operator '&*' instead}}
let y = (0 as Int32) * int4(0) // expected-error{{'*' is unavailable: integer vector types do not support checked arithmetic; use the wrapping operator '&*' instead}}
var d = int4(0)
d += int4(0) // expected-error{{'+=' is unavailable: integer vector types do not support checked arithmetic; use the wrapping operator '&+=' instead}}
d -= int4(0) // expected-error{{'-=' is unavailable: integer vector types do not support checked arithmetic; use the wrapping operator '&-=' instead}}
d *= int4(0) // expected-error{{'*=' is unavailable: integer vector types do not support checked arithmetic; use the wrapping operator '&*=' instead}}
d *= 0 // expected-error{{'*=' is unavailable: integer vector types do not support checked arithmetic; use the wrapping operator '&*=' instead}}