gcov: Fix wrong usage of NAN in statistics (PR gcov-profile/86536).
[official-gcc.git] / gcc / testsuite / gcc.misc-tests / gcov-pr86536.c
blob4817773599955cf2f6b97b8182f802628d85759f
1 // PR gcov-profile/86536
2 // { dg-options "-fprofile-arcs -ftest-coverage" }
3 // { dg-do run { target native } }
4 // { dg-require-fork "" }
6 #include <stdlib.h>
7 #include <unistd.h>
8 #include <sys/types.h>
9 #include <sys/wait.h>
11 int
12 main (void)
15 int j = 22; /* count(1) */
17 /* returns(200) */
18 fork (); /* count(1) */
19 /* returns(end) */
21 int i = 7; /* count(2) */
22 return 0; /* count(2) */
25 // { dg-final { run-gcov branches calls { -b gcov-pr86536.c } } }