if (seen_error ())
return;
- if (gimple_conditional_context () && ! force_uncond)
+ if (gimple_conditional_context ())
{
/* If we're in a conditional context, this is more complex. We only
want to run the cleanup if we actually ran the initialization that
}
val
*/
- tree flag = create_tmp_var (boolean_type_node, "cleanup");
- gassign *ffalse = gimple_build_assign (flag, boolean_false_node);
- gassign *ftrue = gimple_build_assign (flag, boolean_true_node);
+ if (force_uncond)
+ {
+ gimplify_stmt (&cleanup, &cleanup_stmts);
+ wce = gimple_build_wce (cleanup_stmts);
+ gimplify_seq_add_stmt (&gimplify_ctxp->conditional_cleanups, wce);
+ }
+ else
+ {
+ tree flag = create_tmp_var (boolean_type_node, "cleanup");
+ gassign *ffalse = gimple_build_assign (flag, boolean_false_node);
+ gassign *ftrue = gimple_build_assign (flag, boolean_true_node);
- cleanup = build3 (COND_EXPR, void_type_node, flag, cleanup, NULL);
- gimplify_stmt (&cleanup, &cleanup_stmts);
- wce = gimple_build_wce (cleanup_stmts);
+ cleanup = build3 (COND_EXPR, void_type_node, flag, cleanup, NULL);
+ gimplify_stmt (&cleanup, &cleanup_stmts);
+ wce = gimple_build_wce (cleanup_stmts);
- gimplify_seq_add_stmt (&gimplify_ctxp->conditional_cleanups, ffalse);
- gimplify_seq_add_stmt (&gimplify_ctxp->conditional_cleanups, wce);
- gimplify_seq_add_stmt (pre_p, ftrue);
+ gimplify_seq_add_stmt (&gimplify_ctxp->conditional_cleanups, ffalse);
+ gimplify_seq_add_stmt (&gimplify_ctxp->conditional_cleanups, wce);
+ gimplify_seq_add_stmt (pre_p, ftrue);
- /* Because of this manipulation, and the EH edges that jump
- threading cannot redirect, the temporary (VAR) will appear
- to be used uninitialized. Don't warn. */
- TREE_NO_WARNING (var) = 1;
+ /* Because of this manipulation, and the EH edges that jump
+ threading cannot redirect, the temporary (VAR) will appear
+ to be used uninitialized. Don't warn. */
+ TREE_NO_WARNING (var) = 1;
+ }
}
else
{