summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-23550.rs
blob: 9cce9a0a98b630a36273aa04eae3c1a8fec9fc9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// 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() {}