Closed
Description
The following code triggers an LLVM assert:
#![feature(asm)]
unsafe fn test(x: *mut u32) {
asm!("": "=m" (*x));
}
rustc: /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:6012: void llvm::SelectionDAGBuilder::visitInlineAsm(llvm::ImmutableCallSite): Assertion `(OpInfo.isMultipleAlternative || (OpInfo.Type == InlineAsm::isInput)) && "Can only indirectify direct input operands!"' failed.
One thing of note in the LLVM output is this line:
%5 = call i32 asm "", "=m,~{dirflag},~{fpsr},~{flags}"(), !dbg !199, !srcloc !201
Note that the operand to the asm is left empty for some reason, which is probably wrong.
Metadata
Metadata
Assignees
Labels
Area: Inline assembly (`asm!(…)`)Category: This is a bug.Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Low priorityRelevant to the compiler team, which will review and decide on the PR/issue.ICE tracked in rust-lang/glacier.This issue requires a nightly compiler in some way.