aboutsummaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.loader/TestLeak.java
diff options
context:
space:
mode:
authorJørgen Kvalsvik <jorgen.kvalsvik@woven-planet.global>2022-10-04 15:45:59 +0200
committerJørgen Kvalsvik <jorgen.kvalsvik@woven-planet.global>2022-10-14 10:46:27 +0200
commit4b04292b76e89b332ae70208aabf8f0e12f3a63f (patch)
treee7e6f80b1da677091b901e7d9615de2714159d25 /libjava/testsuite/libjava.loader/TestLeak.java
parentc2565a31c1622ab0926aeef4a6579413e121b9f9 (diff)
downloadgcc-4b04292b76e89b332ae70208aabf8f0e12f3a63f.zip
gcc-4b04292b76e89b332ae70208aabf8f0e12f3a63f.tar.gz
gcc-4b04292b76e89b332ae70208aabf8f0e12f3a63f.tar.bz2
gcov: test switch/break line counts
The coverage support will under some conditions decide to split edges to accurately report coverage. By running the test suite with/without this edge splitting a small diff shows up, addressed by this patch, which should catch future regressions. Removing the edge splitting: $ diff --git a/gcc/profile.cc b/gcc/profile.cc --- a/gcc/profile.cc +++ b/gcc/profile.cc @@ -1244,19 +1244,7 @@ branch_prob (bool thunk) Don't do that when the locuses match, so if (blah) goto something; is not computed twice. */ - if (last - && gimple_has_location (last) - && !RESERVED_LOCATION_P (e->goto_locus) - && !single_succ_p (bb) - && (LOCATION_FILE (e->goto_locus) - != LOCATION_FILE (gimple_location (last)) - || (LOCATION_LINE (e->goto_locus) - != LOCATION_LINE (gimple_location (last))))) - { - basic_block new_bb = split_edge (e); - edge ne = single_succ_edge (new_bb); - ne->goto_locus = e->goto_locus; - } + if ((e->flags & (EDGE_ABNORMAL | EDGE_ABNORMAL_CALL)) && e->dest != EXIT_BLOCK_PTR_FOR_FN (cfun)) need_exit_edge = 1; Assuming the .gcov files from make chec-gcc RUNTESTFLAGS=gcov.exp are kept: $ diff -r no-split-edge with-split-edge | grep -C 2 -E "^[<>]\s\s" diff -r sans-split-edge/gcc/gcov-4.c.gcov with-split-edge/gcc/gcov-4.c.gcov 228c228 < -: 224: break; --- > 1: 224: break; 231c231 < -: 227: break; --- > #####: 227: break; 237c237 < -: 233: break; --- > 2: 233: break; gcc/testsuite/ChangeLog: * g++.dg/gcov/gcov-1.C: Add line count check. * gcc.misc-tests/gcov-4.c: Likewise.
Diffstat (limited to 'libjava/testsuite/libjava.loader/TestLeak.java')
0 files changed, 0 insertions, 0 deletions