Skip to content

u128::count_ones is broken on aarch64-unknown-none-softfloat #80374

Closed
@AaronKutch

Description

@AaronKutch
#![no_std]

pub fn u128_count_ones(x: u128) -> u32 {
    x.count_ones()
}

when compiled with cargo build --target aarch64-unknown-none-softfloat it gives:

error: could not compile `testlib`

Caused by:
  process didn't exit successfully: `rustc --crate-name testlib --edition=2018 src\lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=ec790c6e5e4455bc -C extra-filename=-ec790c6e5e4455bc --out-dir C:\Users\aaron\Documents\github\testlib\target\aarch64-unknown-none-softfloat\debug\deps --target aarch64-unknown-none-softfloat -C incremental=C:\Users\aaron\Documents\github\testlib\target\aarch64-unknown-none-softfloat\debug\incremental -L dependency=C:\Users\aaron\Documents\github\testlib\target\aarch64-unknown-none-softfloat\debug\deps -L dependency=C:\Users\aaron\Documents\github\testlib\target\debug\deps` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)

This is preventing upgrading the compiler-builtins used by rustc. See rust-lang/compiler-builtins#398 and #79863.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.O-ArmTarget: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 stateT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions