aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.misc-tests/gcov-26.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.misc-tests/gcov-26.c')
-rw-r--r--gcc/testsuite/gcc.misc-tests/gcov-26.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-26.c b/gcc/testsuite/gcc.misc-tests/gcov-26.c
new file mode 100644
index 0000000..d204cd3
--- /dev/null
+++ b/gcc/testsuite/gcc.misc-tests/gcov-26.c
@@ -0,0 +1,25 @@
+/* { dg-options "-fprofile-arcs -ftest-coverage" } */
+/* { dg-do run { target native } } */
+
+/* Filters are considered in order with latest-wins, so if a function is
+ excluded and later included it should show up. */
+
+int
+fn1 (int x)
+{
+ /* fst */
+ return x;
+}
+
+int
+fn2 (int x)
+{
+ /* snd */
+ return x * 2;
+}
+
+int
+main ()
+{}
+
+/* { dg-final { run-gcov { filters { fst snd } { main } } { --exclude=1 --include=fn gcov-26.c } } } */