2 // ignore-emscripten FIXME(#45351)
4 #![feature(repr_simd, test)]
9 pub struct Mu64(pub u64, pub u64, pub u64, pub u64);
12 // This ensures an unaligned pointer even in optimized builds, though LLVM
13 // gets enough type information to actually not mess things up in that case,
14 // but at the time of writing this, it's enough to trigger the bug in
15 // non-optimized builds
17 let memory = &mut [0u64; 8] as *mut _ as *mut u8;
18 let misaligned_ptr: &mut [u8; 32] = {
19 std::mem::transmute(memory.offset(1))
21 *misaligned_ptr = std::mem::transmute(Mu64(1, 1, 1, 1));
22 test::black_box(memory);