b1c0cf2ef9
- fix volatile_store logic - rename test to be able to read back from later - expand test to use assert_eq! and confirm to fix volatile_store - expand test to use assert_eq! and confirm normal load
13 lines
307 B
Rust
13 lines
307 B
Rust
// related: #58645
|
|
#![feature(core_intrinsics)]
|
|
use std::intrinsics::{volatile_load, volatile_store};
|
|
|
|
pub fn main() {
|
|
unsafe {
|
|
let i: &mut (isize, isize) = &mut (0, 0);
|
|
volatile_store(i, (1, 2));
|
|
assert_eq!(volatile_load(i), (1, 2));
|
|
assert_eq!(i, &mut (1, 2));
|
|
}
|
|
}
|