diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-11-28 08:43:32 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-11-28 08:43:32 +0000 |
commit | bd37ce3e00c3438c4a3873b10960de41ba92a7de (patch) | |
tree | 64d90923bdd9deb69efa042cc7ae54b08df598bf /gcc/gimplify.c | |
parent | 07b69d3f1cd3dd8ebb0af1fbff95914daee477d2 (diff) |
* tree.def (SWITCH_EXPR): Change from 3 operand to 2 operand tree.
Adjust comment.
* tree.h (SWITCH_LABELS): Remove.
* gimplify.c (gimplify_switch_expr): Don't test SWITCH_LABELS,
assert SWITCH_BODY is non-NULL.
* tree-pretty-print.c (dump_generic_node): Remove SWITCH_LABELS
handling.
* tree.c (block_may_fallthru): Always return true; for SWITCH_EXPR.
c/
* c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
of build3.
cp/
* cp-gimplify.c (genericize_switch_stmt): Build SWITCH_EXPR using
build2_loc instead of build3_loc.
ada/
* gcc-interface/trans.c (Case_Statement_to_gnu): Build SWITCH_EXPR
using build2 instead of build3.
jit/
* jit-playback.c (add_switch): Build SWITCH_EXPR using build2 instead
of build3. Formatting fixes. Adjust funciton comment.
fortran/
* trans-decl.c (gfc_trans_entry_master_switch): Build SWITCH_EXPR
using fold_build2_loc instead of fold_build3_loc.
* trans-io.c (io_result): Likewise.
* trans-stmt.c (gfc_trans_integer_select, gfc_trans_character_select):
Likewise.
go/
* go-gcc.cc (Gcc_backend::switch_statement): Build SWITCH_EXPR using
build2_loc instead of build3_loc.
brig/
* brigfrontend/brig-branch-inst-handler.cc
(brig_branch_inst_handler::operator): Build SWITCH_EXPR using build2
instead of build3.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@255192 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 13dbbe0538d..8769505b313 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -2287,10 +2287,6 @@ gimplify_switch_expr (tree *expr_p, gimple_seq *pre_p) tree default_case = NULL_TREE; gswitch *switch_stmt; - /* If someone can be bothered to fill in the labels, they can - be bothered to null out the body too. */ - gcc_assert (!SWITCH_LABELS (switch_expr)); - /* Save old labels, get new ones from body, then restore the old labels. Save all the things from the switch body to append after. */ saved_labels = gimplify_ctxp->case_labels; @@ -2347,7 +2343,7 @@ gimplify_switch_expr (tree *expr_p, gimple_seq *pre_p) labels.release (); } else - gcc_assert (SWITCH_LABELS (switch_expr)); + gcc_unreachable (); return GS_ALL_DONE; } |