Skip to content

i686-pc-windows-gnu fails to compile rsbegin #109996

Closed
@kleisauke

Description

@kleisauke

Reproducer

I tried this script:

$ curl https://sh.rustup.rs -sSf | sh -s -- -y \
    --profile minimal \
    --target i686-pc-windows-gnu \
    --default-toolchain nightly-2023-04-01 \
    --component rust-src
$ source "$HOME/.cargo/env"
$ rustc --target=i686-pc-windows-gnu --emit=obj -o rsbegin.o $(rustc --print sysroot)/lib/rustlib/src/rust/library/rtstartup/rsbegin.rs

I expected to see a successful complication.

Instead, this happened:

error: requires `panic` lang_item
  --> /home/kleisauke/.rustup/toolchains/nightly-2023-04-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rtstartup/rsbegin.rs:82:65
   |
82 |         __register_frame_info(&__EH_FRAME_BEGIN__ as *const u8, &mut OBJ as *mut _ as *mut u8);
   |                                                                 ^^^^^^^^

error: requires `panic` lang_item
  --> /home/kleisauke/.rustup/toolchains/nightly-2023-04-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rtstartup/rsbegin.rs:87:67
   |
87 |         __deregister_frame_info(&__EH_FRAME_BEGIN__ as *const u8, &mut OBJ as *mut _ as *mut u8);
   |                                                                   ^^^^^^^^

error: aborting due to 2 previous errors

Passing -Zmir-enable-passes=-CheckAlignment seems to fix this, so it looks like a possible regression introduced in #98112.

Version it worked on

It most recently worked on: rustc 1.70.0-nightly (ec2f40c 2023-03-30)

Version with regression

rustc --version --verbose:

rustc 1.70.0-nightly (5e1d3299a 2023-03-31)
binary: rustc
commit-hash: 5e1d3299a290026b85787bc9c7e72bcc53ac283f
commit-date: 2023-03-31
host: x86_64-unknown-linux-gnu
release: 1.70.0-nightly
LLVM version: 16.0.0

@rustbot modify labels: +regression-from-stable-to-nightly -regression-untriaged

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.P-mediumMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions