aboutsummaryrefslogtreecommitdiff
path: root/gcc/final.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/final.c')
-rw-r--r--gcc/final.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/final.c b/gcc/final.c
index cdae011..30890b3 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -1863,11 +1863,13 @@ 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;
- }
+ /* There is no cfg for a thunk. */
+ if (!cfun->is_thunk)
+ 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. */