Prevent extraneous errors from returnjump_p with rtl checking

Nick Clifton
Tue Feb 15 10:13:00 GMT 2000

Hi Franz,

: I believe this whole check should be moved into the 'else' of 'if 
: (pattern==SEQUENCE)', otherwise I'm flooded with this message on the 
: newppc-branch if RTL-checking is enabled. I don't think it makes sense to 
: check the last insn of a SEQUENCE, or?

Why not ?  Or rather wouldn't it be better to check each of the insns
in the sequence individually ?


PS.  For reference purposes here is the function under discussion:

  emit_insn (pattern)
       rtx pattern;
    rtx insn = last_insn;
    if (GET_CODE (pattern) == SEQUENCE)
        register int i;
        for (i = 0; i < XVECLEN (pattern, 0); i++)
  	  insn = XVECEXP (pattern, 0, i);
  	  add_insn (insn);
        if (!ggc_p && XVECLEN (pattern, 0) < SEQUENCE_RESULT_SIZE)
  	sequence_result[XVECLEN (pattern, 0)] = pattern;
        insn = make_insn_raw (pattern);
        add_insn (insn);
    if (insn
        && GET_RTX_CLASS (GET_CODE (insn)) == 'i'
        && (returnjump_p (insn)
  	  || (GET_CODE (insn) == SET
  	      && SET_DEST (insn) == pc_rtx)))
        warning ("ICE: emit_insn used where emit_jump_insn needed:\n");
        debug_rtx (insn);
    return insn;

More information about the Gcc-patches mailing list