https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126262
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2026-07-15
Ever confirmed|0 |1
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I think the bug is in
_1 = (_BitInt(1024)) u_16(D);
__y_17 = -_1;
_18 = .MUL_OVERFLOW (__y_17, 1);
getting
__y_17 -> bitint.4
_18 -> bitint.4
i.e. both the lhs and rhs1 getting the same underlying variable, so that we end
up with
.MULBITINT (&bitint.4, 513, &bitint.4, -513, &*.LC1, 1);
That is wrong, because both __mulbitint3 and __divmodbitint4 require that the
input operands don't overlap the result, because they need to read from the
input operands before writing the full output but already after storing part of
it.