2022-11-10 10:37:28 -06:00
|
|
|
//@ run-fail
|
2023-06-15 17:02:55 -05:00
|
|
|
//@ ignore-i686-pc-windows-msvc: #112480
|
2022-11-10 10:37:28 -06:00
|
|
|
//@ compile-flags: -C debug-assertions
|
|
|
|
//@ error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let mut x = [0u32; 2];
|
2023-07-04 13:23:16 -05:00
|
|
|
let ptr = x.as_mut_ptr();
|
2022-11-10 10:37:28 -06:00
|
|
|
unsafe {
|
2023-07-04 13:23:16 -05:00
|
|
|
let _v = *(ptr.byte_add(1));
|
2022-11-10 10:37:28 -06:00
|
|
|
}
|
|
|
|
}
|