[Bug tree-optimization/101150] [11/12/13 Regression] null pointer dereference false positive disappears when compiling an additional function
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 23 18:05:12 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101150
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |needs-bisection
Known to work| |13.0
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
On the trunk, the warning is gone so is the missed optimization mentioned in
comment #1.
We do have another missed optimization though:
_12 = _9 - _15;
_7 = _12 /[ex] 4;
_18 = (long unsigned int) _7;
_120 = _18 != 0;
_54 = _12 != 0;
_127 = _54 & _120;
if (_127 != 0)
goto <bb 3>; [16.50%]
else
goto <bb 9>; [83.50%]
...
<bb 9> [local count: 98623186]:
if (_9 != _15)
goto <bb 10>; [89.00%]
else
goto <bb 23>; [11.00%]
Only one of those comparisons is actually needed. and then another missing jump
threading because _9 be equal _15 on the goto <bb 9> branch.
More information about the Gcc-bugs
mailing list