Skip to content

Internal llvm failure if using -O2 with thumbv7em-linux-eabi target #14870

Closed
@farcaller

Description

@farcaller

On cross-compiling libcore, if cpu is locked in to cortex-m4 and -O2 is used, llvm fails with unreachable:

rustc --target thumbv7em-linux-eabi -Ctarget-cpu=cortex-m4 --opt-level 2 libcore/lib.rs
Unexpected member type for HA
UNREACHABLE executed at /Users/farcaller/temp/rust/src/llvm/lib/Target/ARM/ARMCallingConv.h:213!

Compiling without --opt-level 2 or -Ctarget-cpu=cortex-m4 works as expected.

PS: I think this is an LLVM bug, but I cannot figure out a small test case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions