On 6/24/19 7:13 AM, Martin Liška wrote:
> 
> Hi.
> 
> The patch is fixing following clang-static-analyzer error:
> /home/marxin/Programming/gcc/gcc/bb-reorder.c:1031:2: warning: Value stored 
> to 'is_better_edge' is never read
>         is_better_edge = true;
>         ^                ~~~~
> /home/marxin/Programming/gcc/gcc/bb-reorder.c:1034:2: warning: Value stored 
> to 'is_better_edge' is never read
>         is_better_edge = false;
>         ^                ~~~~~
> 
> It seems to me a missing else branch.
> Honza?
> 
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
> 
> Ready to be installed?
> Thanks,
> Martin
> 
> gcc/ChangeLog:
> 
> 2019-06-24  Martin Liska  <mli...@suse.cz>
> 
>       * bb-reorder.c (connect_better_edge_p): Add missing else
>       statement in the middle of if-else statements.
Seems reasonable.  Essentially we'll be using counts the vast majority
of the time to determine which is the better edge -- which roughly
matches the comments in the code.

OK for the trunk.
jeff

Reply via email to