aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.misc-tests
diff options
context:
space:
mode:
authorBernd Edlinger <edlinger@gcc.gnu.org>2017-06-05 19:27:30 +0000
committerBernd Edlinger <edlinger@gcc.gnu.org>2017-06-05 19:27:30 +0000
commit676519f7138e4ab3938fe4427c3515ca37fe7976 (patch)
tree7e870093fa932a90587c27490e54116a476f9c85 /gcc/testsuite/gcc.misc-tests
parent7b95ed64c90de3f9e8a2eb47f8ddd9a8344e559b (diff)
downloadgcc-676519f7138e4ab3938fe4427c3515ca37fe7976.zip
gcc-676519f7138e4ab3938fe4427c3515ca37fe7976.tar.gz
gcc-676519f7138e4ab3938fe4427c3515ca37fe7976.tar.bz2
invoke.texi: Document the -fprofile-abs-path option.
2017-06-05 Bernd Edlinger <bernd.edlinger@hotmail.de> * doc/invoke.texi: Document the -fprofile-abs-path option. * common.opt (fprofile-abs-path): New option. * gcov-io.h (gcov_write_filename): Declare. * gcov-io.c (gcov_write_filename): New function. * coverage.c (coverage_begin_function): Use gcov_write_filename. * profile.c (output_location): Likewise. gcc/testsuite: 2017-06-05 Bernd Edlinger <bernd.edlinger@hotmail.de> * gcc.misc-tests/gcov-1a.c: New test. From-SVN: r248894
Diffstat (limited to 'gcc/testsuite/gcc.misc-tests')
-rw-r--r--gcc/testsuite/gcc.misc-tests/gcov-1a.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-1a.c b/gcc/testsuite/gcc.misc-tests/gcov-1a.c
new file mode 100644
index 0000000..2b9fabc
--- /dev/null
+++ b/gcc/testsuite/gcc.misc-tests/gcov-1a.c
@@ -0,0 +1,20 @@
+/* Test Gcov basics. */
+
+/* { dg-options "-fprofile-arcs -ftest-coverage -fprofile-abs-path" } */
+/* { dg-do run { target native } } */
+
+void noop ()
+{
+}
+
+int main ()
+{
+ int i;
+
+ for (i = 0; i < 10; i++) /* count(11) */
+ noop (); /* count(10) */
+
+ return 0; /* count(1) */
+}
+
+/* { dg-final { run-gcov gcov-1a.c } } */