2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / gcov / gcov-2.C
blob66d8af39bce402032b6e5d60929e5980d34a272e
1 /* Verify line coverage counts for simple member functions. */
3 /* { dg-options "-fprofile-arcs -ftest-coverage" } */
4 /* { dg-do run { target native } } */
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;
21 void foo()
23   C c;                                  /* count(1) */
24   c.seti (1);                           /* count(1) */
27 int main()
29   foo();                                /* count(1) */
32 /* { dg-final { run-gcov gcov-2.C } } */