| 1 |
/* { dg-options "-fprofile-arcs -ftest-coverage -Ofast" } */ |
| 2 |
/* { dg-do run { target native } } */ |
| 3 |
/* { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } } */ |
| 4 |
|
| 5 |
#include <iostream> |
| 6 |
|
| 7 |
void __attribute__ ((noinline)) |
| 8 |
Out (std::ostream &out, double x) |
| 9 |
{ out << x << std::endl; } /* count(1) */ |
| 10 |
|
| 11 |
int main () |
| 12 |
{ |
| 13 |
Out (std::cout, 1.5); /* count(1) */ |
| 14 |
return 0; |
| 15 |
} |
| 16 |
|
| 17 |
/* { dg-final { run-gcov gcov-14.C } } */ |
| 18 |
/* run-gcov cleanups up after itself, but doesn't find all created gcov files. |
| 19 |
We could try to grep for ^Created in the exec log, but since there's only one |
| 20 |
testcase where we create these extra gcov files, do a local cleanup for |
| 21 |
now. */ |
| 22 |
/* { dg-final { remote_file target delete iostream.gcov ostream.gcov locale_facets.h.gcov } } */ |