summaryrefslogtreecommitdiff
path: root/gcc/final.c
diff options
context:
space:
mode:
authorccoutant <ccoutant@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-06 22:49:05 +0000
committerccoutant <ccoutant@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-06 22:49:05 +0000
commit35e514ff654263204c03ed950fd41d22e44fa3cc (patch)
treeb93db13b742aa3913318cc28093782f8de4635c7 /gcc/final.c
parente053750d33e14ca245e14e1c467709a9bf6c6282 (diff)
downloadgcc-35e514ff654263204c03ed950fd41d22e44fa3cc.tar.gz
2012-08-06 Cary Coutant <ccoutant@google.com>
gcc/ * cgraphunit.c (assemble_thunk): Add source line info. * final.c (final): Check for non-null cfg pointer. gcc/testsuite/ * g++.dg/debug/dwarf2/non-virtual-thunk.C: New test case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190190 138bc75d-0d04-0410-961f-82ee72b054a4
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 cdae0117388..30890b3ce22 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. */