Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / gcov / gcov-20.C
blobfb33f7ecbddab50a99532d8ed039c8ed7cae5f7f
1 /* { dg-options "-fprofile-arcs -ftest-coverage" } */
2 /* { dg-do run { target native } } */
4 /* Filtering also works by targeting the mangled symbol directly, but the
5    subtlety is not really caught by the test framework.  Matching on fn1I[df]
6    prints the "overlapping blocks" of both the float and double instantiation,
7    but *not* the int instantiation.  The extra {} around the --include argument
8    is quoting for tcl/dejagnu.  */
10 template <typename T>
12 fn1 (T x)
14   /* fst */
15   return x;
18 template <typename T>
20 fn2 (T x)
22   /* snd */
23   return 2 * x;
26 int
27 main ()
29   fn1 (2);
30   fn1 (2.0);
31   fn1 (2.0f);
33   fn2 (2);
34   fn2 (2.0);
35   fn2 (2.0f);
38 /* { dg-final { run-gcov { filters { fst } { snd } } { {--include=fn1I[fd]} gcov-20.C } } } */