diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-16 22:08:01 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-16 22:08:01 +0000 |
commit | 6e721d5016627d8f6523615eba0b4975ba29ee1b (patch) | |
tree | 1fe1f03500d1e925cfdab311883d9cd8a69c4e11 /gcc/gimplify.c | |
parent | d38ef55bac40228f56451376c85136d4b577d784 (diff) | |
download | gcc-6e721d5016627d8f6523615eba0b4975ba29ee1b.tar.gz |
PR c/37529
* gimplify.c (gimplify_expr) <case GOTO_EXPR>: If gimplification of
GOTO_DESTINATION failed, don't create GIMPLE_GOTO.
* gcc.dg/pr37529.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140402 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 81b21c5fa66..bb38ba398f6 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -6483,8 +6483,12 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, /* 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; |