diff options
author | Jakub Jelinek <jakub@redhat.com> | 2021-04-21 12:31:45 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2021-04-21 12:31:45 +0200 |
commit | 022f6ee3ad67ee30f62c8c2aeeb4156494f3284e (patch) | |
tree | 72c8a4621724009714cea62bfcdc505f82f1b0b3 /gcc/dwarf2out.c | |
parent | 021607e12cb9c40d0859b78490f44bb3f7da5812 (diff) | |
download | gcc-022f6ee3ad67ee30f62c8c2aeeb4156494f3284e.zip gcc-022f6ee3ad67ee30f62c8c2aeeb4156494f3284e.tar.gz gcc-022f6ee3ad67ee30f62c8c2aeeb4156494f3284e.tar.bz2 |
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.
Diffstat (limited to 'gcc/dwarf2out.c')
0 files changed, 0 insertions, 0 deletions