https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97923

Xionghu Luo (luoxhu at gcc dot gnu.org) <yinyuefengyi at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yinyuefengyi at gmail dot com

--- Comment #5 from Xionghu Luo (luoxhu at gcc dot gnu.org) <yinyuefengyi at 
gmail dot com> ---
gcov-dump test.gcno -lp
test.gcno:  583:    01450000:  35:LINES
test.gcno:  595:                  block 2:`test.c':1, 5
test.gcno:  626:    01450000:  31:LINES
test.gcno:  638:                  block 3:`test.c':3
test.gcno:  665:    01450000:  31:LINES
test.gcno:  677:                  block 4:`test.c':4
test.gcno:  704:    01450000:  31:LINES
test.gcno:  716:                  block 5:`test.c':4
test.gcno:  743:    01450000:  31:LINES
test.gcno:  755:                  block 6:`test.c':5
test.gcno:  782:    01450000:  31:LINES
test.gcno:  794:                  block 7:`test.c':5
test.gcno:  821:    01450000:  31:LINES
test.gcno:  833:                  block 8:`test.c':5
test.gcno:  860:    01450000:  31:LINES
test.gcno:  872:                  block 9:`test.c':5
test.gcno:  899:    01450000:  31:LINES
test.gcno:  911:                  block 10:`test.c':5
test.gcno:  938:    01450000:  31:LINES
test.gcno:  950:                  block 11:`test.c':5

It seems that the block location of block 2 is incorect, the gcno shows block 2
is located in line 1 and line 5, but actually it is located in line 1 and line
3 as block 2 maps to source code c>='A' only?

int foo (char c)
{
  int iftmp.0;
  int D.2744;
  int iftmp.0_1;
  int iftmp.0_3;
  int iftmp.0_4;
  int _5;

  <bb 2> :
  if (c_2(D) > 64)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  if (c_2(D) <= 90)
    goto <bb 8>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 4> :
  if (c_2(D) > 96)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]
  • [Bug gcov-profile/97923] [GCOV]... yinyuefengyi at gmail dot com via Gcc-bugs

Reply via email to