Skip to content

Unexpected non-scalars in outputs of asm! cause rustc to dump core #37435

Closed
@cbiffle

Description

@cbiffle

Unexpected non-scalars in outputs of asm! cause rustc to dump core. (Doing this inputs causes a different problem; see #37433).

To reproduce:

#![feature(asm)]

fn main() {
    unsafe {
        asm!("" : "=r"(""));
    }
}

I get:

rustc: /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/llvm/lib/IR/InlineAsm.cpp:46: llvm::InlineAsm::InlineAsm(llvm::FunctionType*, const string&, const string&, bool, bool, llvm::InlineAsm::AsmDialect): Assertion `Verify(getFunctionType(), constraints) && "Function type not legal for constraints!"' failed.
Aborted (core dumped)

Meta

rustc --version --verbose:
rustc 1.14.0-nightly (c59cb71 2016-10-26)
binary: rustc
commit-hash: c59cb71
commit-date: 2016-10-26
host: x86_64-unknown-linux-gnu
release: 1.14.0-nightly
LLVM version: 3.9

No backtrace was produced (core dumped).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-inline-assemblyArea: Inline assembly (`asm!(…)`)C-bugCategory: This is a bug.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.requires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions