Skip to content

compiler_rt: fix rare case in udivei4 #14828

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 8, 2023
Merged

Conversation

jacobly0
Copy link
Member

@jacobly0 jacobly0 commented Mar 7, 2023

Unsigned integers are never less than zero, and so zig helpfully deleted the entire case. 😁

Closes #14816

jacobly0 added 2 commits March 7, 2023 03:00
Unsigned integers are never less than zero, and so zig
helpfully deleted the entire case. :D

Closes ziglang#14816
@adriandelgado
Copy link

When I found this bug, it only showed up when using division assignment, but I see you are using normal division operators in your tests. However, I know nothing about compiler internals, so it might be the same, idk.

@jacobly0
Copy link
Member Author

jacobly0 commented Mar 7, 2023

When I found this bug, it only showed up when using division assignment, but I see you are using normal division operators in your tests. However, I know nothing about compiler internals, so it might be the same, idk.

What's important isn't / vs /=, but const vs var. As usual, I checked that the added test fails without the fix and succeeds with the fix.

@andrewrk andrewrk enabled auto-merge March 7, 2023 23:44
@andrewrk andrewrk merged commit 6fc1621 into ziglang:master Mar 8, 2023
@jacobly0 jacobly0 deleted the fix-big-div branch March 8, 2023 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistency between division operator vs assignment (debug only)
3 participants