This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix -Wlogical-not-parentheses warning in sel-sched-ir.c (PR c/61271)
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Andrey Belevantsev <abel at ispras dot ru>
- Cc: Marek Polacek <polacek at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 26 Aug 2014 16:25:17 +0200
- Subject: Re: [PATCH] Fix -Wlogical-not-parentheses warning in sel-sched-ir.c (PR c/61271)
- Authentication-results: sourceware.org; auth=none
- References: <20140826140318 dot GA2264 at redhat dot com> <53FC96D1 dot 70805 at ispras dot ru>
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
>>
>