-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It isn't clear to me why these error patterns do not trigger, but I am not going to waste time analyzing bugs in compiletest.
- Loading branch information
1 parent
fb42fac
commit dac348e
Showing
6 changed files
with
17 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
//@error-pattern: cannot be represented in target type `i32` | ||
#![feature(portable_simd)] | ||
use std::simd::*; | ||
|
||
fn main() { | ||
unsafe { | ||
let _x: i32x2 = f32x2::from_array([f32::MAX, f32::MIN]).to_int_unchecked(); | ||
let _x: i32x2 = f32x2::from_array([f32::MAX, f32::MIN]).to_int_unchecked(); //~ERROR: cannot be represented in target type `i32` | ||
} | ||
} |
13 changes: 4 additions & 9 deletions
13
src/tools/miri/tests/fail/intrinsics/simd-float-to-int.stderr
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 |
---|---|---|
@@ -1,11 +1,10 @@ | ||
//@error-pattern: pointer to 1 byte starting at offset 9 is out-of-bounds | ||
#![feature(portable_simd)] | ||
use std::simd::*; | ||
|
||
fn main() { | ||
unsafe { | ||
let vec: &[i8] = &[10, 11, 12, 13, 14, 15, 16, 17, 18]; | ||
let idxs = Simd::from_array([9, 3, 0, 17]); | ||
let _result = Simd::gather_select_unchecked(&vec, Mask::splat(true), idxs, Simd::splat(0)); | ||
let _result = Simd::gather_select_unchecked(&vec, Mask::splat(true), idxs, Simd::splat(0)); //~ERROR: pointer to 1 byte starting at offset 9 is out-of-bounds | ||
} | ||
} |
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
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