]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR tree-optimization/40585 (tracer duplicates blocks w/o adjusting EH tree)
authorRichard Guenther <rguenther@suse.de>
Thu, 2 Jul 2009 12:15:27 +0000 (12:15 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 2 Jul 2009 12:15:27 +0000 (12:15 +0000)
2009-07-02  Richard Guenther  <rguenther@suse.de>

        PR middle-end/40585
* tree-cfg.c (tree_can_duplicate_bb_p): Disallow duplicating
basic blocks with RESX_EXPR.

From-SVN: r149172

gcc/ChangeLog
gcc/tree-cfg.c

index 065439d9c35a4789437d4bab177a64b192d353d6..6a11ef4ecc1754c197c591c5514336f1add36218 100644 (file)
@@ -1,3 +1,9 @@
+2009-07-02  Richard Guenther  <rguenther@suse.de>
+
+       PR middle-end/40585
+       * tree-cfg.c (gimple_can_duplicate_bb_p): Disallow duplicating
+       basic blocks with GIMPLE_RESX.
+
 2009-07-01  Ben Elliston  <bje@au.ibm.com>
 
        Backport from mainline:
index 2924b777bccfd7172b153e136ae49e562c8c71f4..25a6216ba86f6c2c7bc9c0e603b1a996041f3d1c 100644 (file)
@@ -5048,8 +5048,12 @@ tree_move_block_after (basic_block bb, basic_block after)
 /* Return true if basic_block can be duplicated.  */
 
 static bool
-tree_can_duplicate_bb_p (const_basic_block bb ATTRIBUTE_UNUSED)
+tree_can_duplicate_bb_p (const_basic_block bb)
 {
+  tree_stmt_iterator tsi = tsi_last (bb_stmt_list (bb));
+  /* We cannot duplicate RESX_EXPRs due to expander limitations.  */
+  if (!tsi_end_p (tsi) && TREE_CODE (tsi_stmt (tsi)) == RESX_EXPR)
+    return false;
   return true;
 }