2019-10-29 00:00:00 +00:00
|
|
|
// build-pass
|
2015-06-10 20:33:52 +00:00
|
|
|
#![feature(core_intrinsics)]
|
2015-03-20 23:21:38 +00:00
|
|
|
#![allow(warnings)]
|
|
|
|
|
|
|
|
use std::intrinsics;
|
|
|
|
|
2015-03-30 13:38:27 +00:00
|
|
|
#[derive(Copy, Clone)]
|
2015-03-20 23:21:38 +00:00
|
|
|
struct Wrap(i64);
|
|
|
|
|
2016-03-31 13:32:31 +00:00
|
|
|
// These volatile intrinsics used to cause an ICE
|
2015-03-20 23:21:38 +00:00
|
|
|
|
|
|
|
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() {}
|