aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorZdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>2003-08-27 23:13:17 +0200
committerZdenek Dvorak <rakdver@gcc.gnu.org>2003-08-27 21:13:17 +0000
commit3d7ca1673b3387bf420f02e3b45122ab75ff15e5 (patch)
tree7c28704c1941f5fa04436a77f72fd996d53ee36f /gcc/testsuite
parent37e0ff11557b3ebc5917151becaaeb9514c8692d (diff)
downloadgcc-3d7ca1673b3387bf420f02e3b45122ab75ff15e5.zip
gcc-3d7ca1673b3387bf420f02e3b45122ab75ff15e5.tar.gz
gcc-3d7ca1673b3387bf420f02e3b45122ab75ff15e5.tar.bz2
gcov.c (typedef struct arc_info): New field cs_count.
* gcov.c (typedef struct arc_info): New field cs_count. (accumulate_line_counts): Find cycles correctly. * gcc.misc-tests/gcov-10b.c: New test. From-SVN: r70859
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.misc-tests/gcov-10b.c16
2 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 576845a..0877585 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2003-08-27 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
+
+ * gcc.misc-tests/gcov-10b.c: New test.
+
2003-08-27 Mark Mitchell <mark@codesourcery.com>
* g++.dg/opt/ptrmem3.C: New test.
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-10b.c b/gcc/testsuite/gcc.misc-tests/gcov-10b.c
new file mode 100644
index 0000000..148d779
--- /dev/null
+++ b/gcc/testsuite/gcc.misc-tests/gcov-10b.c
@@ -0,0 +1,16 @@
+/* Test gcov block mode. */
+
+/* { dg-options "-fprofile-arcs -ftest-coverage" } */
+/* { dg-do run { target native } } */
+
+int main ()
+{
+ unsigned ix, jx = 0;
+
+ ix = 10; goto test; loop: ; if (ix & 1) jx++; test: ; if (ix--) goto loop; /* count(11) */
+
+ return jx != 5;
+}
+
+/* { dg-final { run-gcov { -a gcov-10b.c } } } */
+