Skip to content

Commit 0e052f5

Browse files
committed
Add SIMD vector type tests
1 parent c5a7be6 commit 0e052f5

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

src/test/compile-fail/simd-type.rs

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#[simd]
2+
struct vec4<T>(T, T, T, T); //~ ERROR SIMD vector cannot be generic
3+
4+
#[simd]
5+
struct empty; //~ ERROR SIMD vector cannot be empty
6+
7+
#[simd]
8+
struct i64f64(i64, f64); //~ ERROR SIMD vector should be homogeneous
9+
10+
#[simd]
11+
struct int4(int, int, int, int); //~ ERROR SIMD vector element type should be machine type
12+
13+
fn main() {}

src/test/run-pass/simd-type.rs

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#[simd]
2+
struct RGBA {
3+
r: f32,
4+
g: f32,
5+
b: f32,
6+
a: f32
7+
}
8+
9+
fn main() {}

0 commit comments

Comments
 (0)