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 assert in get_loop_body_in_bfs_order


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++];
     }


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