mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Most tests were using %swift or similar substitutions, which did not include the target triple and SDK. The driver was defaulting to the host OS. Thus, we could not run the tests when the standard library was not built for OS X. Swift SVN r24504
51 lines
2.0 KiB
Swift
51 lines
2.0 KiB
Swift
// RUN: %target-parse-verify-swift -parse-stdlib
|
|
|
|
var word: Builtin.Word
|
|
var i16: Builtin.Int16
|
|
var i32: Builtin.Int32
|
|
var i64: Builtin.Int64
|
|
var i128: Builtin.Int128
|
|
|
|
// Check that trunc/?ext operations are appropriately available given the
|
|
// abstract range of potential Word sizes.
|
|
|
|
word = Builtin.truncOrBitCast_Int128_Word(i128)
|
|
word = Builtin.truncOrBitCast_Int64_Word(i64)
|
|
word = Builtin.truncOrBitCast_Int32_Word(i32) // expected-error{{}}
|
|
word = Builtin.truncOrBitCast_Int16_Word(i16) // expected-error{{}}
|
|
|
|
i16 = Builtin.truncOrBitCast_Word_Int16(word)
|
|
i32 = Builtin.truncOrBitCast_Word_Int32(word)
|
|
i64 = Builtin.truncOrBitCast_Word_Int64(word) // expected-error{{}}
|
|
i128 = Builtin.truncOrBitCast_Word_Int128(word) // expected-error{{}}
|
|
|
|
word = Builtin.zextOrBitCast_Int128_Word(i128) // expected-error{{}}
|
|
word = Builtin.zextOrBitCast_Int64_Word(i64) // expected-error{{}}
|
|
word = Builtin.zextOrBitCast_Int32_Word(i32)
|
|
word = Builtin.zextOrBitCast_Int16_Word(i16)
|
|
|
|
i16 = Builtin.zextOrBitCast_Word_Int16(word) // expected-error{{}}
|
|
i32 = Builtin.zextOrBitCast_Word_Int32(word) // expected-error{{}}
|
|
i64 = Builtin.zextOrBitCast_Word_Int64(word)
|
|
i128 = Builtin.zextOrBitCast_Word_Int128(word)
|
|
|
|
word = Builtin.trunc_Int128_Word(i128)
|
|
word = Builtin.trunc_Int64_Word(i64) // expected-error{{}}
|
|
word = Builtin.trunc_Int32_Word(i32) // expected-error{{}}
|
|
word = Builtin.trunc_Int16_Word(i16) // expected-error{{}}
|
|
|
|
i16 = Builtin.trunc_Word_Int16(word)
|
|
i32 = Builtin.trunc_Word_Int32(word) // expected-error{{}}
|
|
i64 = Builtin.trunc_Word_Int64(word) // expected-error{{}}
|
|
i128 = Builtin.trunc_Word_Int128(word) // expected-error{{}}
|
|
|
|
word = Builtin.zext_Int128_Word(i128) // expected-error{{}}
|
|
word = Builtin.zext_Int64_Word(i64) // expected-error{{}}
|
|
word = Builtin.zext_Int32_Word(i32) // expected-error{{}}
|
|
word = Builtin.zext_Int16_Word(i16)
|
|
|
|
i16 = Builtin.zext_Word_Int16(word) // expected-error{{}}
|
|
i32 = Builtin.zext_Word_Int32(word) // expected-error{{}}
|
|
i64 = Builtin.zext_Word_Int64(word) // expected-error{{}}
|
|
i128 = Builtin.zext_Word_Int128(word)
|