RFA init_propagate_block_info abort

Graham Stott graham.stott@btinternet.com
Fri Aug 2 19:39:00 GMT 2002


All,

I'm trying to understand some code in flow.c  init_propagate_block_info,
inside the #ifdef HAVE_conditional_execution we have this bit of code

---------------------------------------------------------------------------
        ...

       /* Extract the condition from the branch.  */
       set_src = SET_SRC (pc_set (bb->end));
       cond_true = XEXP (set_src, 0);
       cond_false = gen_rtx_fmt_ee (reverse_condition (GET_CODE (cond_true)),
                                    GET_MODE (cond_true), XEXP (cond_true, 0),
                                    XEXP (cond_true, 1));
       if (GET_CODE (XEXP (set_src, 1)) == PC)
         {
           rtx t = cond_false;
           cond_false = cond_true;
           cond_true = t;
         }

       /* Compute which register lead different lives in the successors.  */
       if (bitmap_operation (diff, bb_true->global_live_at_start,
                             bb_false->global_live_at_start, BITMAP_XOR))
         {
           rtx reg = XEXP (cond_true, 0);

           if (GET_CODE (reg) == SUBREG)
             reg = SUBREG_REG (reg);

           if (GET_CODE (reg) != REG)
             abort ();

           SET_REGNO_REG_SET (pbi->reg_cond_reg, REGNO (reg));
         ...

---------------------------------------------------------------------------

This code is asserting that operand 0 of the true condition is either a REG
or a SUBREG of a REG, but on the d30v port I'm seeing a CONST_INT which
triggers the abort. The set_src is

   (if_then_else (ne:CC (const_int 1 [0x1])
         (const_int 0 [0x0]))
     (label_ref 5304)
     (pc))

I haven't worked out yet if the assertion is correct or the set_src insn
is wrong.

Any ideas anyone?

Cheers
Graham





More information about the Gcc-bugs mailing list