Skip to content
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

Fix incorrect range calculation for operator rem #7610

Merged
merged 1 commit into from
Sep 1, 2023

Conversation

bjorng
Copy link
Contributor

@bjorng bjorng commented Aug 31, 2023

acf3116 enhanced the range calculation for rem, but at the same time introduced a bug. For example:

2 rem X

If the range for X was unknown, the compiler would calculate the range for the remainder as {2,2}, while the correct range is {0,2}. This commit corrects the range calculation for the remainder to ensure that zero is always included in the range.

acf3116 enhanced the range calculation for `rem`, but at the
same time introduced a bug. For example:

    2 rem X

If the range for `X` was unknown, the compiler would calculate the
range for the remainder as `{2,2}`, while the correct range is
`{0,2}`. This commit corrects the range calculation for the remainder
to ensure that zero is always included in the range.
@bjorng bjorng added team:VM Assigned to OTP team VM fix testing currently being tested, tag is used by OTP internal CI labels Aug 31, 2023
@bjorng bjorng requested a review from sverker August 31, 2023 05:28
@bjorng bjorng self-assigned this Aug 31, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 31, 2023

CT Test Results

       4 files     416 suites   55m 11s ⏱️
2 170 tests 2 105 ✔️ 65 💤 0
6 717 runs  6 632 ✔️ 85 💤 0

Results for commit b0926ff.

♻️ This comment has been updated with latest results.

@bjorng bjorng merged commit c0474db into erlang:master Sep 1, 2023
18 checks passed
@bjorng bjorng deleted the bjorn/compiler/correct-bounds branch September 1, 2023 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants