https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121928
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
David, any progress on this?
Note, the test passes with --param=analyzer-bb-explosion-factor=6 instead of
the default --param=analyzer-bb-explosion-factor=5, and the old code fails with
--param=analyzer-bb-explosion-factor=3.
One question is whether analyzer needs to handle integral same precision
different sign casts as separate ops rather than just remembering for the
arithmetics in between (especially for ops like +/-/*/<< etc. which do have
same behavior for signed/unsigned except for the former can have some UB cases)
whether it is wrapping or undefined overflow.
__result_6 = *__mem_5(D);
_1 = *__mem_5(D);
_2 = (long int) __val_7(D);
_3 = _1 + _2;
*__mem_5(D) = _3;
return __result_6;
vs.
__result_5 = *__mem_4(D);
__u_6 = (long unsigned int) __result_5;
_1 = (long unsigned int) __val_7(D);
__u_8 = _1 + __u_6;
__u.0_2 = (long int) __u_8;
*__mem_4(D) = __u.0_2;
return __result_5;
is just the 2 extra casts.