[PATCH] Fix assert in get_loop_body_in_bfs_order

Richard Biener rguenther@suse.de
Tue Jun 9 08:17:00 GMT 2015


Noticed when it crashed rather than asserted with broken
loop structure.

Bootstrapped / tested on x86_64-unknown-linux-gnu, applied.

Richard.

2015-06-09  Richard Biener  <rguenther@suse.de>

	* cfgloop.c (get_loop_body_in_bfs_order): Fix assert.

Index: gcc/cfgloop.c
===================================================================
--- gcc/cfgloop.c	(revision 224266)
+++ gcc/cfgloop.c	(working copy)
@@ -954,7 +954,7 @@ get_loop_body_in_bfs_order (const struct
 	    }
 	}
 
-      gcc_assert (i >= vc);
+      gcc_assert (i > vc);
 
       bb = blocks[vc++];
     }



More information about the Gcc-patches mailing list