https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114290

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Yes this is a dup of bug 113907.

What is happening is fnsplit happens and splits off from both f and g:

    return {A / B + (A % B != 0)};
and
    return {C / D + (C % D != 0)};

into a new 2 functions and the range information is still there for A/B (C/D).

Which is fine.
And then ICF comes along and sees this 2 new functions are the same (which they
are) but since the range information is there still from one version of the
function (which in this case the bad one), the wrong result happens.

This is all described in PR 113907 too.

*** This bug has been marked as a duplicate of bug 113907 ***

Reply via email to