On Sat, Aug 4, 2012 at 1:38 AM, Cary Coutant <ccout...@google.com> wrote: > diff --git a/gcc/final.c b/gcc/final.c > index 095d608..d22130f 100644 > --- a/gcc/final.c > +++ b/gcc/final.c > @@ -1863,11 +1863,12 @@ final (rtx first, FILE *file, int optimize_p) > start_to_bb = XCNEWVEC (basic_block, bb_map_size); > end_to_bb = XCNEWVEC (basic_block, bb_map_size); > > - FOR_EACH_BB_REVERSE (bb) > - { > - start_to_bb[INSN_UID (BB_HEAD (bb))] = bb; > - end_to_bb[INSN_UID (BB_END (bb))] = bb; > - } > + if (cfun->cfg != NULL) > + FOR_EACH_BB_REVERSE (bb) > + { > + start_to_bb[INSN_UID (BB_HEAD (bb))] = bb; > + end_to_bb[INSN_UID (BB_END (bb))] = bb; > + } > } > > /* Output the insns. */
Maybe check cfun->is_thunk instead? Everything else should have a cfg. Ciao! Steven