2009-05-31 Jakub Jelinek PR middle-end/40304 * recog.c (peephole2_optimize): When seeing a RTX_FRAME_RELATED_P insn, reinitialize peep2_insn_data and peep2_current in addition to clearing peep2_current_count. --- gcc/recog.c.jj 2009-05-19 10:51:33.000000000 +0200 +++ gcc/recog.c 2009-05-30 21:23:44.000000000 +0200 @@ -3118,7 +3118,13 @@ peephole2_optimize (void) /* If an insn has RTX_FRAME_RELATED_P set, peephole substitution would lose the REG_FRAME_RELATED_EXPR that is attached. */ + for (i = 0; i < MAX_INSNS_PER_PEEP2; ++i) + peep2_insn_data[i].insn = NULL_RTX; peep2_current_count = 0; + peep2_insn_data[MAX_INSNS_PER_PEEP2].insn = PEEP2_EOB; + peep2_current = MAX_INSNS_PER_PEEP2; + bitmap_copy (peep2_insn_data[peep2_current].live_before, + live); attempt = NULL; } else