aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.misc-tests/gcov-pr86536.c
blob: 4817773599955cf2f6b97b8182f802628d85759f (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
// PR gcov-profile/86536
// { dg-options "-fprofile-arcs -ftest-coverage" }
// { dg-do run { target native } }
// { dg-require-fork "" }

#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>

int
main (void)
{

  int j = 22;		  /* count(1) */

			  /* returns(200) */
  fork ();		  /* count(1)  */
			  /* returns(end) */

  int i = 7;		  /* count(2) */
  return 0;		  /* count(2) */
}

// { dg-final { run-gcov branches calls { -b gcov-pr86536.c } } }