OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [gcov/] [gcov-2.C] - Blame information for rev 301

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
/* 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(2) */
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 } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.