aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/gcov/gcov-14.C
blob: 68f3ab4305587d16c67393a234aa06df19e07e97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-options "-fprofile-arcs -ftest-coverage -Ofast" } */
/* { dg-do run { target native } } */
/* { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } } */

#include <iostream>

void __attribute__ ((noinline))
  Out (std::ostream &out, double x)
{ out << x << std::endl; } /* count(1) */

int main ()
{
  Out (std::cout, 1.5); /* count(1) */
  return 0;
}

/* { dg-final { run-gcov gcov-14.C } } */
/* run-gcov cleanups up after itself, but doesn't find all created gcov files.
   We could try to grep for ^Created in the exec log, but since there's only one
   testcase where we create these extra gcov files, do a local cleanup for
   now.  */
/* { dg-final { remote_file target delete iostream.gcov ostream.gcov locale_facets.h.gcov } } */