This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Another bug in your lastest checkin.

> set_block_for_new_insns requires a basic_block and note an edge.
> I've no idea how this apparently works assuming that the else part
> of the code actually gets exercised.
>       /* If optimization is off, and perhaps in an empty function,
>          the entry block will have no successors.  */
>       if (ENTRY_BLOCK_PTR->succ)
>         {
>           /* Can't deal with multiple successsors of the entry block.  */
>           if (ENTRY_BLOCK_PTR->succ->succ_next)
>             abort ();
>           insert_insn_on_edge (seq, ENTRY_BLOCK_PTR->succ);
>           inserted = 1;
>         }
>       else
>         set_block_for_new_insns (emit_insn_after (seq, f),
>                                  ENTRY_BLOCK_PTR->succ);
> 				 ^requires BB and not EDGE!
Hmm, the change came from sanity checking every emit_insn, but after
closer look, it looks like the code is dead now.  We always do have CFG
built (even when not optimizing) and so we always excercise the first
part of if.

Richard, looks sane to just remove the the if?

> Graham

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]