From 9e851845f6bcd7c13f3d42c13cd2f1c0e87f68cc Mon Sep 17 00:00:00 2001
From: Jakub Jelinek <jakub@redhat.com>
Date: Tue, 28 Nov 2017 09:43:32 +0100
Subject: tree.def (SWITCH_EXPR): Change from 3 operand to 2 operand tree.

	* 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.

From-SVN: r255192
---
 gcc/tree.def | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

(limited to 'gcc/tree.def')

diff --git a/gcc/tree.def b/gcc/tree.def
index 7523f57..9b6e06f 100644
--- a/gcc/tree.def
+++ b/gcc/tree.def
@@ -943,10 +943,8 @@ DEFTREECODE (LOOP_EXPR, "loop_expr", tcc_statement, 1)
    Operand 0 is the expression used to perform the branch,
    Operand 1 is the body of the switch, which probably contains
      CASE_LABEL_EXPRs.  It may also be NULL, in which case operand 2
-     must not be NULL.
-   Operand 2 is either NULL_TREE or a TREE_VEC of the CASE_LABEL_EXPRs
-     of all the cases.  */
-DEFTREECODE (SWITCH_EXPR, "switch_expr", tcc_statement, 3)
+     must not be NULL.  */
+DEFTREECODE (SWITCH_EXPR, "switch_expr", tcc_statement, 2)
 
 /* Used to represent a case label.
 
-- 
cgit v1.1

