diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2003-04-06 13:18:41 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2003-04-06 13:18:41 +0000 |
commit | 10b7602f3fcd1e5aac1d07e32b0c7c3c4d60426d (patch) | |
tree | a6fbf3af5cdd76991bee5fa0747e84b86b53a463 /gcc/testsuite/gcc.misc-tests/gcov-9.c | |
parent | 910c46b516b50e2ca38ade41c44c0f4194c1392e (diff) | |
download | gcc-10b7602f3fcd1e5aac1d07e32b0c7c3c4d60426d.zip gcc-10b7602f3fcd1e5aac1d07e32b0c7c3c4d60426d.tar.gz gcc-10b7602f3fcd1e5aac1d07e32b0c7c3c4d60426d.tar.bz2 |
gcov.c (struct arc_info): Replace local_span with cycle.
. * gcov.c (struct arc_info): Replace local_span with cycle.
(struct block_info): Replace u.span with u.cycle. Add is_call_return.
(solve_flow_graph): Set is_call_return.
(add_line_counts): Adjust. In block mode, blocks attach to last line.
(accumulate_line_counts): Find graph cycles, not spanning tree.
(output_branch_count): Adjust.
(output_lines): Adjust.
* doc/gcov.texi: Update.
testsuite:
* gcc.misc-test/gcov-9.c: New test.
* gcc.misc-test/gcov-10.c: New test
* gcc.misc-test/gcov-11.c: New test.
From-SVN: r65299
Diffstat (limited to 'gcc/testsuite/gcc.misc-tests/gcov-9.c')
-rw-r--r-- | gcc/testsuite/gcc.misc-tests/gcov-9.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-9.c b/gcc/testsuite/gcc.misc-tests/gcov-9.c new file mode 100644 index 0000000..6e1b4a8 --- /dev/null +++ b/gcc/testsuite/gcc.misc-tests/gcov-9.c @@ -0,0 +1,15 @@ +/* Test gcov block mode. */ + +/* { dg-options "-fprofile-arcs -ftest-coverage" } */ +/* { dg-do run { target native } } */ + +int main () +{ + unsigned ix; + + for (ix = 10; ix--;); /* count(11) */ + + return 0; +} + +/* { dg-final { run-gcov { -a gcov-9.c } } } */ |