Fix PassMode::Cast ABI argument lowering - #1659
Open
1sgtpepper wants to merge 4 commits into
Open
Conversation
bjorn3
reviewed
May 31, 2026
Member
|
It would be nice if we had a concrete test for a case that goes wrong without this change. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
Collaborator
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Author
|
@bjorn3 rebased, enabled the ABI-cafe regression, and CI is green. Could you re-review when convenient? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1477.
Updates
PassMode::Castlowering to pass rounded full ABI units for integer rest fields, matchingCastTarget's rounded ABI layout. Casted arguments now use a zero-initialized ABI-sized scratch slot before loading ABI parameters, preventing padding from being read from the Rust-layout representation.The previously waived
SingleVariantUnion::conv_c::repr_cABI-cafe case is now enabled on macOS AArch64.Verification:
cargo fmt --checkcargo check --locked