bb-reorder.c (reorder_basic_blocks_simple): Clear BB_VISITED before using it.
authorRichard Biener <rguenther@suse.de>
Mon, 17 Oct 2016 12:27:48 +0000 (12:27 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 17 Oct 2016 12:27:48 +0000 (12:27 +0000)
2016-10-17  Richard Biener  <rguenther@suse.de>

* bb-reorder.c (reorder_basic_blocks_simple): Clear BB_VISITED
before using it.

From-SVN: r241237

gcc/ChangeLog
gcc/bb-reorder.c

index 9f4ff42fc298369bb033319fc84941d341ed414d..ad04a21c0b3c86ca414b392b09636ea2fa6b834a 100644 (file)
@@ -1,3 +1,8 @@
+2016-10-17  Richard Biener  <rguenther@suse.de>
+
+       * bb-reorder.c (reorder_basic_blocks_simple): Clear BB_VISITED
+       before using it.
+
 2016-10-17  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
 
        PR tree-optimization/71636
index ef1c476f318694bb9f92d6b258b21d52a761785f..85bc5698090af6e909aac82d1cbb18e3cad7ade8 100644 (file)
@@ -2355,7 +2355,10 @@ reorder_basic_blocks_simple (void)
      To start with, everything points to itself, nothing is assigned yet.  */
 
   FOR_ALL_BB_FN (bb, cfun)
-    bb->aux = bb;
+    {
+      bb->aux = bb;
+      bb->flags &= ~BB_VISITED;
+    }
 
   EXIT_BLOCK_PTR_FOR_FN (cfun)->aux = 0;