[Bug gcov-profile/90425] [GCOV] wrong coverage for complicated function call in if expression when the abort() statement is in the body of if statement

2019-05-10 Thread yangyibiao at nju dot edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90425

--- Comment #2 from Yibiao Yang  ---
(In reply to Martin Liška from comment #1)
> Confirmed, we already have a duplicate for it. It's about trailing '||'
> operator.
> Following is fine:
> 
> -:4:int
> 1:5:main ()
> -:6:{
> 1:7:  long a = 0x89ABCDEF;
> -:8:
> 1:9:  if (f1(a)!=0x8900L
> 1:   10:  || f6(a)!=0x89ABL)
> #:   11:__builtin_abort();
> 1:   12:  __builtin_exit(0);
> -:   13:}

Got it. Thanks a lot.

[Bug gcov-profile/90425] [GCOV] wrong coverage for complicated function call in if expression when the abort() statement is in the body of if statement

2019-05-10 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90425

Martin Liška  changed:

   What|Removed |Added

   Priority|P3  |P5
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-05-10
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Confirmed, we already have a duplicate for it. It's about trailing '||'
operator.
Following is fine:

-:4:int
1:5:main ()
-:6:{
1:7:  long a = 0x89ABCDEF;
-:8:
1:9:  if (f1(a)!=0x8900L
1:   10:  || f6(a)!=0x89ABL)
#:   11:__builtin_abort();
1:   12:  __builtin_exit(0);
-:   13:}