This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix -Wlogical-not-parentheses warning in sel-sched-ir.c (PR c/61271)
- From: Marek Polacek <polacek at redhat dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, Andrey Belevantsev <abel at ispras dot ru>
- Date: Tue, 26 Aug 2014 16:03:19 +0200
- Subject: [PATCH] Fix -Wlogical-not-parentheses warning in sel-sched-ir.c (PR c/61271)
- Authentication-results: sourceware.org; auth=none
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?
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
&& !(bb->flags & BB_IRREDUCIBLE_LOOP))
loop_hdr[bb->index] = bb->loop_father->num;
}
Marek