[Bug gcov-profile/86536] Function "returned NAN %" for a simple program which forks

2018-08-30 Thread mcastelluccio at mozilla dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86536

--- Comment #4 from Marco Castelluccio  ---
Sorry for the delay, it sounds fine to me, I can't think of anything better
than that!

[Bug gcov-profile/86536] Function "returned NAN %" for a simple program which forks

2018-07-26 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86536

Martin Liška  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Martin Liška  ---
Fixed.

[Bug gcov-profile/86536] Function "returned NAN %" for a simple program which forks

2018-07-26 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86536

--- Comment #2 from Martin Liška  ---
Author: marxin
Date: Thu Jul 26 08:50:21 2018
New Revision: 262991

URL: https://gcc.gnu.org/viewcvs?rev=262991=gcc=rev
Log:
gcov: Fix wrong usage of NAN in statistics (PR gcov-profile/86536).

2018-07-26  Martin Liska  

PR gcov-profile/86536
* gcov.c (format_gcov): Use printf format %.*f directly
and do not handle special values.
2018-07-26  Martin Liska  

PR gcov-profile/86536
* gcc.misc-tests/gcov-pr86536.c: New test.

Added:
trunk/gcc/testsuite/gcc.misc-tests/gcov-pr86536.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gcov.c
trunk/gcc/testsuite/ChangeLog

[Bug gcov-profile/86536] Function "returned NAN %" for a simple program which forks

2018-07-17 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86536

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2018-07-17
   Assignee|unassigned at gcc dot gnu.org  |marxin at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Confirmed, as fork returns twice, I'm probably fine with reflecting that.
Marco what do you think about:

$ gcov pr86536.c -t -ab
-:0:Source:pr86536.c
-:0:Graph:pr86536.gcno
-:0:Data:pr86536.gcda
-:0:Runs:1
-:0:Programs:1
-:1:int foo;
-:2:
function main called 1 returned 200% blocks executed 88%
1:3:int main(void) {
1:4:  int j = 22;
-:5:
1:6:  fork();
1:6-block  0
call0 returned 200%
-:7:
2:8:  int i = 7;
-:9:
2:   10:  if (foo)
branch  0 taken 0% (fallthrough)
branch  1 taken 100%
#:   11:foo ++;
%:   11-block  0
-:   12:
   90:   13:  for (int i = 0; i < 44; i++)
2:   13-block  0
   90:   13-block  1
branch  0 taken 98%
branch  1 taken 2% (fallthrough)
   88:   14:foo++;
   88:   14-block  0
-:   15:
2:   16:  return 0;
2:   16-block  0
-:   17:}