This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix -Wlogical-not-parentheses warning in sel-sched-ir.c (PR c/61271)


On Tue, Aug 26, 2014 at 4:16 PM, Andrey Belevantsev <abel@ispras.ru> wrote:
> On 26.08.2014 18:03, Marek Polacek wrote:
>>
>> Another wrongdoing detected by -Wlogical-not-parentheses.  From
>> my reading of the code it seems that simple "!=" was meant here.
>>
>> Bootstrapped/regtested on x86_64-linux, ok for trunk?
>
>
> OK. Heck, we traced this code back to the May 2007 commit :)
>
> Andrey
>
>
>>
>> 2014-08-26  Marek Polacek  <polacek@redhat.com>
>>
>>         PR c/61271
>>         * sel-sched-ir.c (make_regions_from_the_rest): Fix condition.
>>
>> diff --git gcc/sel-sched-ir.c gcc/sel-sched-ir.c
>> index c36658f..dd777fa 100644
>> --- gcc/sel-sched-ir.c
>> +++ gcc/sel-sched-ir.c
>> @@ -6185,7 +6185,7 @@ make_regions_from_the_rest (void)
>>
>>     FOR_EACH_BB_FN (bb, cfun)
>>       {
>> -      if (bb->loop_father && !bb->loop_father->num == 0
>> +      if (bb->loop_father && bb->loop_father->num != 0

OTOH it checked the correct thing ;)

Richard.

>>           && !(bb->flags & BB_IRREDUCIBLE_LOOP))
>>         loop_hdr[bb->index] = bb->loop_father->num;
>>       }
>>
>>         Marek
>>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]