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
+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:
/* 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;
}