Debian Codegraph @

gcc/testsuite/g++.dg/gcov/gcov-19.C

raw
1 /* { dg-options "-fprofile-arcs -ftest-coverage" } */
2 /* { dg-do run { target native } } */
3
4 /* Filtering on the function base name generally works well, because it becomes
5 an unadultered part of the symbol. */
6
7 template <typename T>
8 T
9 fn1 (T x)
10 {
11 /* fst */
12 return x;
13 }
14
15 template <typename T>
16 T
17 fn2 (T x)
18 {
19 /* snd */
20 return 2 * x;
21 }
22
23 int
24 main ()
25 {
26 fn1 (2);
27 fn1 (2.0);
28 fn1 (2.0f);
29
30 fn2 (2);
31 fn2 (2.0);
32 fn2 (2.0f);
33 }
34
35 /* { dg-final { run-gcov { filters { fn1 } { fn2 } } { --include=fn1 gcov-19.C } } } */