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

Ian Lance Taylor <ian at airs dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #45013|0                           |1
        is obsolete|                            |
  Attachment #45018|0                           |1
        is obsolete|                            |

--- Comment #8 from Ian Lance Taylor <ian at airs dot com> ---
Created attachment 45019
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45019&action=edit
Standalone test case

An even smaller test case.  The miscompilation is definitely in the lehmerGCD
function.  The computation `ua+q*ub` is being dropped in the 115t.dom2 pass.  I
don't know why.  I haven't been able to recreate this in a C test case.  I
don't know why.

Note that in Go the division a / b compiles to
    a == -1 ? (b == -1 ? 1 : 0) : a / b
and a % b compiles to
    a == -1 ? (b == -1 ? 0 : a) : a % b
That is related to this, in that it causes extra basic blocks, and something
about the block merging in dom2 is causing the expression to be discarded.

Reply via email to