diff options
Diffstat (limited to 'tests/ui/issues/issue-23550.rs')
-rw-r--r-- | tests/ui/issues/issue-23550.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-23550.rs b/tests/ui/issues/issue-23550.rs new file mode 100644 index 000000000..9cce9a0a9 --- /dev/null +++ b/tests/ui/issues/issue-23550.rs @@ -0,0 +1,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() {} |