mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
23 lines
442 B
Rust
23 lines
442 B
Rust
//@ build-pass
|
|
#![feature(core_intrinsics)]
|
|
#![allow(warnings)]
|
|
|
|
use std::intrinsics;
|
|
|
|
#[derive(Copy, Clone)]
|
|
struct Wrap(i64);
|
|
|
|
// These volatile intrinsics used to cause an ICE
|
|
|
|
unsafe fn test_bool(p: &mut bool, v: bool) {
|
|
intrinsics::volatile_load(p);
|
|
intrinsics::volatile_store(p, v);
|
|
}
|
|
|
|
unsafe fn test_immediate_fca(p: &mut Wrap, v: Wrap) {
|
|
intrinsics::volatile_load(p);
|
|
intrinsics::volatile_store(p, v);
|
|
}
|
|
|
|
fn main() {}
|