https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77844
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Wed Dec 14 19:40:05 2016 New Revision: 243662 URL: https://gcc.gnu.org/viewcvs?rev=243662&root=gcc&view=rev Log: PR debug/77844 * valtrack.c: Include rtl-iter.h. (struct rtx_subst_pair): Add insn field. (propagate_for_debug_subst): If pair->to contains at least 2 regs, create a DEBUG_INSN with a debug temp before pair->insn and replace from with the debug temp instead of pair->to. (propagate_for_debug): Initialize p.insn. * combine.c (insn_uid_check): New inline function. (INSN_COST, LOG_LINKS): Use it instead of INSN_UID. (find_single_use, combine_instructions, cant_combine_insn_p, try_combine): Use NONDEBUG_INSN_P instead of INSN_P. * g++.dg/opt/pr77844.C: New test. Added: trunk/gcc/testsuite/g++.dg/opt/pr77844.C Modified: trunk/gcc/ChangeLog trunk/gcc/combine.c trunk/gcc/testsuite/ChangeLog trunk/gcc/valtrack.c