Debian Codegraph @

gcc/testsuite/g++.dg/gcov/gcov-11.C

raw
1 /* Check that unexecuted exception processing regions are shown
2 distinct from unexecuted normal regions. */
3
4 /* { dg-options "-fprofile-arcs -ftest-coverage" } */
5 /* { dg-do run { target native } } */
6
7 void Baz (int i)
8 {
9 if (i)
10 throw 1;
11 }
12
13 void Boz () throw ()
14 {
15 }
16
17 int main ()
18 {
19 try
20 {
21 Baz (0); /* count (1) */
22 Baz (0); /* count (1) */
23 }
24 catch (...)
25 {
26 Boz (); /* count (=====) */
27 }
28
29 try
30 {
31 Baz (1); /* count (1) */
32 Baz (0); /* count (#####) */
33 }
34 catch (...)
35 {
36 Boz (); /* count (1) */
37 }
38
39 return 0; /* count (1) */
40 }
41
42 /* { dg-final { run-gcov gcov-11.C } } */