Index: gcc/ChangeLog =================================================================== --- gcc/ChangeLog (revision 214195) +++ gcc/ChangeLog (revision 214196) @@ -1,5 +1,15 @@ 2014-08-19 David Malcolm + * rtl.h (next_cc0_user): Strengthen return type from rtx to + rtx_insn *. + (prev_cc0_setter): Likewise. + + * emit-rtl.c (next_cc0_user): Strengthen return type from rtx to + rtx_insn *, adding checked casts for now as necessary. + (prev_cc0_setter): Likewise. + +2014-08-19 David Malcolm + * expr.h (emit_move_insn): Strengthen return type from rtx to rtx_insn *. (emit_move_insn_1): Likewise. Index: gcc/emit-rtl.c =================================================================== --- gcc/emit-rtl.c (revision 214195) +++ gcc/emit-rtl.c (revision 214196) @@ -3450,13 +3450,13 @@ Return 0 if we can't find the insn. */ -rtx +rtx_insn * next_cc0_user (rtx insn) { rtx note = find_reg_note (insn, REG_CC_USER, NULL_RTX); if (note) - return XEXP (note, 0); + return safe_as_a (XEXP (note, 0)); insn = next_nonnote_insn (insn); if (insn && NONJUMP_INSN_P (insn) && GET_CODE (PATTERN (insn)) == SEQUENCE) @@ -3463,7 +3463,7 @@ insn = XVECEXP (PATTERN (insn), 0, 0); if (insn && INSN_P (insn) && reg_mentioned_p (cc0_rtx, PATTERN (insn))) - return insn; + return safe_as_a (insn); return 0; } @@ -3471,18 +3471,18 @@ /* Find the insn that set CC0 for INSN. Unless INSN has a REG_CC_SETTER note, it is the previous insn. */ -rtx +rtx_insn * prev_cc0_setter (rtx insn) { rtx note = find_reg_note (insn, REG_CC_SETTER, NULL_RTX); if (note) - return XEXP (note, 0); + return safe_as_a (XEXP (note, 0)); insn = prev_nonnote_insn (insn); gcc_assert (sets_cc0_p (PATTERN (insn))); - return insn; + return safe_as_a (insn); } #endif Index: gcc/rtl.h =================================================================== --- gcc/rtl.h (revision 214195) +++ gcc/rtl.h (revision 214196) @@ -2440,8 +2440,8 @@ extern rtx_insn *prev_active_insn (rtx); extern rtx_insn *next_active_insn (rtx); extern int active_insn_p (const_rtx); -extern rtx next_cc0_user (rtx); -extern rtx prev_cc0_setter (rtx); +extern rtx_insn *next_cc0_user (rtx); +extern rtx_insn *prev_cc0_setter (rtx); /* In emit-rtl.c */ extern int insn_line (const_rtx);