[-fcompare-debug] find jump before debug insns in expand
commit4dbebf6fc367d4730d252bb6b1c669d533c13b92
authorAlexandre Oliva <aoliva@redhat.com>
Thu, 5 Jan 2017 01:46:32 +0000 (5 01:46 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Thu, 5 Jan 2017 01:46:32 +0000 (5 01:46 +0000)
tree667b218094a140a82f7e0a1580cd9223daa468b0
parent556655048b30188a560f135ccde732bc436eded2
[-fcompare-debug] find jump before debug insns in expand

A debug insn after the final jump of a basic block may cause the
expander to emit a dummy move where the non-debug compile won't
because it finds the jump insn at the end of the insn stream.

Fix the condition so that, instead of requiring the jump as the last
insn, it also matches a jump followed by debug insns.

This fixes the compilation of libgcc/libgcov-profiler.c with
-fcompare-debug on i686-linux-gnu.

for  gcc/ChangeLog

* cfgexpand.c (expand_gimple_basic_block): Disregard debug
insns after final jump in test to emit dummy move.

From-SVN: r244089
gcc/ChangeLog
gcc/cfgexpand.c