Skip to content

ICE when using ADX intrinsics on nightly #58020

Closed
@jethrogb

Description

@jethrogb
unsafe fn add_1_2_3() -> u32{
    let mut out = 0;
    std::arch::x86_64::_addcarryx_u32(1, 2, 3, &mut out);
    out
}

fn main() {
    if is_x86_feature_detected!("adx") {
        println!("{}", unsafe { add_1_2_3() });
    }
}
$ rustc +nightly --version
rustc 1.34.0-nightly (d8a0dd7ae 2019-01-28)
$ rustc +nightly adx.rs
Invalid bitcast
i32* bitcast (void <badref> to i32*)
Referencing global in another module!
i32* bitcast (void <badref> to i32*)
; ModuleID = 'feat.7rcbfp3g-cgu.2'
void <badref>
; ModuleID = 'Segmentation fault (core dumped)

Regression from beta to nightly

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler 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