2008-09-16 Jakub Jelinek <jakub@redhat.com>
+ PR c/37529
+ * gimplify.c (gimplify_expr) <case GOTO_EXPR>: If gimplification of
+ GOTO_DESTINATION failed, don't create GIMPLE_GOTO.
+
PR c++/37530
* gimplify.c (gimplify_expr) <case TRY_CATCH_EXPR>: Don't create
GIMPLE_TRY if cleanup sequence is empty.
/* If the target is not LABEL, then it is a computed jump
and the target needs to be gimplified. */
if (TREE_CODE (GOTO_DESTINATION (*expr_p)) != LABEL_DECL)
- ret = gimplify_expr (&GOTO_DESTINATION (*expr_p), pre_p,
- NULL, is_gimple_val, fb_rvalue);
+ {
+ ret = gimplify_expr (&GOTO_DESTINATION (*expr_p), pre_p,
+ NULL, is_gimple_val, fb_rvalue);
+ if (ret == GS_ERROR)
+ break;
+ }
gimplify_seq_add_stmt (pre_p,
gimple_build_goto (GOTO_DESTINATION (*expr_p)));
break;