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