diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2003-04-04 15:48:19 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2003-04-04 15:48:19 +0000 |
commit | 1a4828810083a7e45cf8b53daa579052265e1e61 (patch) | |
tree | 81b52562f56ffa26d6eaced9b95742cd159dc5df /gcc/gcov.c | |
parent | 941747b558952eef5e948def4468e2cc80648a7c (diff) | |
download | gcc-1a4828810083a7e45cf8b53daa579052265e1e61.zip gcc-1a4828810083a7e45cf8b53daa579052265e1e61.tar.gz gcc-1a4828810083a7e45cf8b53daa579052265e1e61.tar.bz2 |
* gcov.c (accumulate_line_counts): Fix span tree merge bug.
From-SVN: r65245
Diffstat (limited to 'gcc/gcov.c')
-rw-r--r-- | gcc/gcov.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -1699,21 +1699,24 @@ accumulate_line_counts (src) { block_t *root = block->u.span.root; block_t *dst_root = dst->u.span.root; - + /* Join spanning trees */ - if (root->u.span.siblings && !dst_root->u.span.root) + if (root->u.span.siblings + && !dst_root->u.span.siblings) { root = dst->u.span.root; dst_root = block->u.span.root; } - dst->u.span.root = root; - root->u.span.siblings += 1 + dst->u.span.siblings; - if (dst->u.span.siblings) + dst_root->u.span.root = root; + root->u.span.siblings + += 1 + dst_root->u.span.siblings; + + if (dst_root->u.span.siblings) { block_t *dst_sib; - dst->u.span.siblings = 0; + dst_root->u.span.siblings = 0; for (dst_sib = line->u.blocks; dst_sib; dst_sib = dst_sib->chain) if (dst_sib->u.span.root == dst_root) |