https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47992
--- Comment #6 from Alan Modra <amodra at gcc dot gnu.org> --- Author: amodra Date: Thu Mar 10 10:48:14 2016 New Revision: 234102 URL: https://gcc.gnu.org/viewcvs?rev=234102&root=gcc&view=rev Log: PR69195, Reload confused by invalid reg_equiv Optimizing indirect jumps to direct jumps, and deleting dead insns can lead to changes in register lifetimes, which in turn can result in bad reg_equiv info being passed to reload. So do these tasks before calculating reg_equiv info. gcc/ PR rtl-optimization/69195 PR rtl-optimization/47992 * ira.c (recorded_label_ref): Delete. (update_equiv_regs): Return void. (indirect_jump_optimize): New function. (ira): Call indirect_jump_optimize and delete_trivially_dead_insns before regstat_compute_ri. Don't rebuild_jump_labels here. gcc/testsuite/ * gcc.dg/pr69195.c: New. * gcc.dg/pr69238.c: New. Added: branches/gcc-5-branch/gcc/testsuite/gcc.dg/pr69195.c branches/gcc-5-branch/gcc/testsuite/gcc.dg/pr69238.c Modified: branches/gcc-5-branch/gcc/ChangeLog branches/gcc-5-branch/gcc/ira.c branches/gcc-5-branch/gcc/testsuite/ChangeLog