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]

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


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


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