Closed
Description
volatile load/store as implemented in #11173 fails on structs.
test.rs
use std::intrinsics::{volatile_load, volatile_store};
struct Test {
_buffer: [u8, ..256]
}
static mut test: Test = Test { _buffer: [0, ..256] };
pub fn main() {
unsafe {
let _a = volatile_load(&test);
// volatile_store(&mut test, test);
}
}
volatile_load
:
Found return instr that returns non-void in Function of void return type!
ret %struct.Test %3
voidBroken module found, compilation aborted!
volatile_store
:
rustc: …/src/llvm/lib/IR/Instructions.cpp:1085: void llvm::StoreInst::AssertOK(): Assertion `getOperand(0)->getType() == cast<PointerType>(getOperand(1)->getType())->getElementType() && "Ptr must be a pointer to Val type!"' failed.
Metadata
Metadata
Assignees
Labels
No labels