diff options
author | Cary Coutant <ccoutant@google.com> | 2012-08-06 22:49:05 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@gcc.gnu.org> | 2012-08-06 15:49:05 -0700 |
commit | 292ffe8608e86772301bf7463ecd1e5e66de8c8d (patch) | |
tree | b93db13b742aa3913318cc28093782f8de4635c7 /gcc/final.c | |
parent | d28cfc4ae6c8651b1631c8c00f016d8258de7458 (diff) | |
download | gcc-292ffe8608e86772301bf7463ecd1e5e66de8c8d.zip gcc-292ffe8608e86772301bf7463ecd1e5e66de8c8d.tar.gz gcc-292ffe8608e86772301bf7463ecd1e5e66de8c8d.tar.bz2 |
cgraphunit.c (assemble_thunk): Add source line info.
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.
From-SVN: r190190
Diffstat (limited to 'gcc/final.c')
-rw-r--r-- | gcc/final.c | 12 |
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. */ |