-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
191 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// failure-status: 101 | ||
// rustc-env:RUST_BACKTRACE=0 | ||
#![feature(const_fn)] | ||
#![feature(repr_simd)] | ||
#![feature(platform_intrinsics)] | ||
#![allow(non_camel_case_types)] | ||
|
||
#[repr(simd)] struct i8x1(i8); | ||
|
||
extern "platform-intrinsic" { | ||
fn simd_extract<T, U>(x: T, idx: u32) -> U; | ||
} | ||
|
||
const X: i8x1 = i8x1(42); | ||
|
||
const fn extract_wrong_ret() -> i16 { | ||
unsafe { simd_extract(X, 0_u32) } | ||
} | ||
|
||
const A: i16 = extract_wrong_ret(); | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
thread 'rustc' panicked at 'assertion failed: `(left == right)` | ||
left: `i8`, | ||
right: `i16`: Return type `i16` must match vector element type `i8`', src/librustc_mir/interpret/intrinsics.rs:281:17 | ||
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace. | ||
|
||
error: internal compiler error: unexpected panic | ||
|
||
note: the compiler unexpectedly panicked. this is a bug. | ||
|
||
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports | ||
|
||
note: rustc 1.39.0-dev running on x86_64-apple-darwin | ||
|
||
note: compiler flags: -Z threads=1 -Z ui-testing -Z unstable-options -C prefer-dynamic -C rpath -C debuginfo=0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// failure-status: 101 | ||
// rustc-env:RUST_BACKTRACE=0 | ||
#![feature(const_fn)] | ||
#![feature(repr_simd)] | ||
#![feature(platform_intrinsics)] | ||
#![allow(non_camel_case_types)] | ||
|
||
#[repr(simd)] struct i8x1(i8); | ||
|
||
extern "platform-intrinsic" { | ||
fn simd_extract<T, U>(x: T, idx: u32) -> U; | ||
} | ||
|
||
const X: i8x1 = i8x1(42); | ||
|
||
const fn extract_wrong_vec() -> i8 { | ||
unsafe { simd_extract(42_i8, 0_u32) } | ||
} | ||
|
||
const B: i8 = extract_wrong_vec(); | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
error: internal compiler error: src/librustc_mir/interpret/operand.rs:346: Type `i8` is not a SIMD vector type | ||
|
||
thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:643:9 | ||
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace. | ||
|
||
note: the compiler unexpectedly panicked. this is a bug. | ||
|
||
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports | ||
|
||
note: rustc 1.39.0-dev running on x86_64-apple-darwin | ||
|
||
note: compiler flags: -Z threads=1 -Z ui-testing -Z unstable-options -C prefer-dynamic -C rpath -C debuginfo=0 | ||
|
||
error: aborting due to previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// failure-status: 101 | ||
// rustc-env:RUST_BACKTRACE=0 | ||
#![feature(const_fn)] | ||
#![feature(repr_simd)] | ||
#![feature(platform_intrinsics)] | ||
#![allow(non_camel_case_types)] | ||
|
||
#[repr(simd)] struct i8x1(i8); | ||
|
||
extern "platform-intrinsic" { | ||
fn simd_extract<T, U>(x: T, idx: u32) -> U; | ||
} | ||
|
||
const X: i8x1 = i8x1(42); | ||
|
||
const fn extract_wrong_idx() -> i8 { | ||
unsafe { simd_extract(X, 1_u32) } | ||
} | ||
|
||
const C: i8 = extract_wrong_idx(); | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
thread 'rustc' panicked at 'index `1` is out-of-bounds of vector type `i8` with length `1`', src/librustc_mir/interpret/intrinsics.rs:276:17 | ||
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace. | ||
|
||
error: internal compiler error: unexpected panic | ||
|
||
note: the compiler unexpectedly panicked. this is a bug. | ||
|
||
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports | ||
|
||
note: rustc 1.39.0-dev running on x86_64-apple-darwin | ||
|
||
note: compiler flags: -Z threads=1 -Z ui-testing -Z unstable-options -C prefer-dynamic -C rpath -C debuginfo=0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// failure-status: 101 | ||
// rustc-env:RUST_BACKTRACE=0 | ||
#![feature(const_fn)] | ||
#![feature(repr_simd)] | ||
#![feature(platform_intrinsics)] | ||
#![allow(non_camel_case_types)] | ||
|
||
#[repr(simd)] struct i8x1(i8); | ||
|
||
extern "platform-intrinsic" { | ||
fn simd_insert<T, U>(x: T, idx: u32, val: U) -> T; | ||
} | ||
|
||
const X: i8x1 = i8x1(42); | ||
|
||
const fn insert_wrong_scalar() -> i8x1 { | ||
unsafe { simd_insert(X, 0_u32, 42_i16) } | ||
} | ||
|
||
const D: i8x1 = insert_wrong_scalar(); | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
thread 'rustc' panicked at 'assertion failed: `(left == right)` | ||
left: `i16`, | ||
right: `i8`: Scalar type `i16` must match vector element type `i8`', src/librustc_mir/interpret/intrinsics.rs:257:17 | ||
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace. | ||
|
||
error: internal compiler error: unexpected panic | ||
|
||
note: the compiler unexpectedly panicked. this is a bug. | ||
|
||
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports | ||
|
||
note: rustc 1.39.0-dev running on x86_64-apple-darwin | ||
|
||
note: compiler flags: -Z threads=1 -Z ui-testing -Z unstable-options -C prefer-dynamic -C rpath -C debuginfo=0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// failure-status: 101 | ||
// rustc-env:RUST_BACKTRACE=0 | ||
#![feature(const_fn)] | ||
#![feature(repr_simd)] | ||
#![feature(platform_intrinsics)] | ||
#![allow(non_camel_case_types)] | ||
|
||
#[repr(simd)] struct i8x1(i8); | ||
|
||
extern "platform-intrinsic" { | ||
fn simd_insert<T, U>(x: T, idx: u32, val: U) -> T; | ||
} | ||
|
||
const X: i8x1 = i8x1(42); | ||
|
||
const fn insert_wrong_idx() -> i8x1 { | ||
unsafe { simd_insert(X, 1_u32, 42_i8) } | ||
} | ||
|
||
const E: i8x1 = insert_wrong_idx(); | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
thread 'rustc' panicked at 'Index `1` must be in bounds of vector type `i8`: `[0, 1)`', src/librustc_mir/interpret/intrinsics.rs:247:17 | ||
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace. | ||
|
||
error: internal compiler error: unexpected panic | ||
|
||
note: the compiler unexpectedly panicked. this is a bug. | ||
|
||
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports | ||
|
||
note: rustc 1.39.0-dev running on x86_64-apple-darwin | ||
|
||
note: compiler flags: -Z threads=1 -Z ui-testing -Z unstable-options -C prefer-dynamic -C rpath -C debuginfo=0 | ||
|
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
src/test/ui/consts/const-eval/simd/insert_extract-fail.stderr
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.