blob: e748989d2c0b478a3b1f7ef0e0d3b9638fb93d15 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/* { dg-options "-fprofile-generate -ftest-coverage " } */
/* { dg-do run { target native } } */
int value;
extern "C"
{
void __gcov_dump(void);
void __gcov_reset(void);
}
int main(int argc, char **argv)
{
value = 123; /* count(1) */
for (unsigned i = 0; i < 100; i++)
value += argc; /* count(100) */
__gcov_dump();
for (unsigned i = 0; i < 1000; i++) /* count(#####) */
value += argc;
__gcov_reset ();
for (unsigned i = 0; i < 10000; i++) /* count(10001) */
value += argc;
return 0; /* count(1) */
}
/* { dg-final { run-gcov gcov-dump-2.C } } */
|