[Bug gcov-profile/85297] [GCOV] "if(0) return;" is wrongly marked as executed when it is prefixed with a address operator "int c=0; &c;" and followed by "if(1) return;" in gcov

marxin at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jul 24 13:19:00 GMT 2018


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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
CFG is following:

main ()
{
  int c;
  int D.1903;
  int _3;

  <bb 2> :
  c = 0;

  <bb 3> :
  _3 = 1;
  // predicted unlikely by early return (on trees) predictor.
  c ={v} {CLOBBER};

  <bb 4> :
<L6>:
  return _3;

}

so again it's optimized out.


More information about the Gcc-bugs mailing list