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

Possible bug in 128-bit integers implementation (gcc_checked_binop) #588

Open
antoyo opened this issue Jan 11, 2025 · 0 comments
Open

Possible bug in 128-bit integers implementation (gcc_checked_binop) #588

antoyo opened this issue Jan 11, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@antoyo
Copy link
Contributor

antoyo commented Jan 11, 2025

It seems there's a mixup between the overflow flag and the result of the operation from what we could see here.

The code that might be wrong is here.

For instance __mulosi4 has the following signature:

si_int __mulosi4(si_int a, si_int b, int *overflow);

while __builtin_mul_overflow has:

bool __builtin_mul_overflow (type1 a, type2 b, type3 *res)

Yet, they seem to be called the same way (mixing up overflow with the return value of res with the other return value).

@antoyo antoyo added the bug Something isn't working label Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant