repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
* gcc.dg/compat/struct-by-value-5a_main.c,
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
gcov
/
gcov-2.C
blob
66d8af39bce402032b6e5d60929e5980d34a272e
1
/* Verify line coverage counts for simple member functions. */
2
3
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
4
/* { dg-do run { target native } } */
5
6
class C {
7
public:
8
C()
9
{
10
i = 0; /* count(1) */
11
}
12
~C() {}
13
void seti (int j)
14
{
15
i = j; /* count(1) */
16
}
17
private:
18
int i;
19
};
20
21
void foo()
22
{
23
C c; /* count(1) */
24
c.seti (1); /* count(1) */
25
}
26
27
int main()
28
{
29
foo(); /* count(1) */
30
}
31
32
/* { dg-final { run-gcov gcov-2.C } } */