aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/gcov/gcov-15.C
blob: fcd16b00b1c40dc084a97eb52b6ea2bc6ca643e4 (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
// PR gcov-profile/64634
// { dg-options "-fprofile-arcs -ftest-coverage" }
// { dg-do run { target native } }

void catchEx ()		// count(1)
{
  __builtin_exit (0);	// count(1)
  try
  {}
  catch (int)
  {}
}

int main ()		// count(1)
{
  try
  {
    throw 5;		// count(1)
  }
  catch (...)		// count(1)
  {
    catchEx ();		// count(1)
  }
}

// { dg-final { run-gcov gcov-15.C } }