https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71631
Marc Glisse <glisse at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kugan at gcc dot gnu.org --- Comment #3 from Marc Glisse <glisse at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #2) > It looks so, but I was hoping all such issues were resolved with > https://gcc.gnu.org/ml/gcc-patches/2013-10/msg01829.html > and other patches :(. It probably was all resolved until the recent 'negate' changes. Reassoc does _11 = -_10; _12 = (unsigned short) _9; - _13 = _11 * _12; _14 = (unsigned short) _7; - _15 = _13 * _14; + _29 = _14 * _12; + _15 = _29 * _10; _16 = (unsigned short) iftmp.3_18; - _17 = _15 * _16; + _30 = _15 * _16; + _17 = -_30; That is, _15 used to be the product of _11, _12 and _14, and reassoc replaced _11 by _10, pulling the negation out of the product.