Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 1af867c

Browse files
committed
Add test for rust-lang#1318
1 parent 916a6c1 commit 1af867c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

example/mini_core_hello_world.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(no_core, lang_items, never_type, linkage, extern_types, thread_local, box_syntax)]
1+
#![feature(no_core, lang_items, never_type, linkage, extern_types, thread_local, box_syntax, repr_simd)]
22
#![no_core]
33
#![allow(dead_code, non_camel_case_types)]
44

@@ -339,7 +339,15 @@ fn main() {
339339

340340
assert_eq!(unsafe { intrinsics::size_of_val(x) }, 0);
341341
assert_eq!(unsafe { intrinsics::min_align_of_val(x) }, 1);
342-
}
342+
}
343+
344+
#[repr(simd)]
345+
struct V([f64; 2]);
346+
347+
unsafe {
348+
let f = V([0.0, 1.0]);
349+
let _a = f.0[0];
350+
}
343351
}
344352

345353
#[cfg(all(not(jit), target_arch = "x86_64", any(target_os = "linux", target_os = "darwin")))]

0 commit comments

Comments
 (0)