[Bug rtl-optimization/100148] [11 Regression] -fcompare-debug failure (length) with -O2 -fno-dce -fno-tree-dce -fno-tree-dominator-opts -fno-tree-sink

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue May 4 12:21:44 GMT 2021


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

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:959719061ab3e9cfa11a2551e20cc0d8c5570a4c

commit r9-9503-g959719061ab3e9cfa11a2551e20cc0d8c5570a4c
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Wed Apr 21 12:31:45 2021 +0200

    cprop: Fix -fcompare-debug bug in constprop_register [PR100148]

    The following testcase shows different behavior between -g and -g0
    in constprop_register, if a flags register setter is separated
    from a conditional jump using those flags with -g by a DEBUG_INSN.
    As it uses just NEXT_INSN, for -g it will look at the DEBUG_INSN which is
    not a conditional jump, while otherwise it would look at the conditional
    jump and call cprop_jump.

    2021-04-21  Jakub Jelinek  <jakub@redhat.com>

            PR rtl-optimization/100148
            * cprop.c (constprop_register): Use next_nondebug_insn instead of
            NEXT_INSN.

            * g++.dg/opt/pr100148.C: New test.

    (cherry picked from commit 022f6ee3ad67ee30f62c8c2aeeb4156494f3284e)


More information about the Gcc-bugs mailing list