This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[tuples] remove GIMPLE_MODIFY_STMT


Phew...

This patch removes the GIMPLE_MODIFY_STMT kludge.  All
GIMPLE_MODIFY_STMT's should be either a GIMPLE_ASSIGN directly, or
a MODIFY_EXPR.

There is a new helper function called gimplify_assign(), which should be
used in places where we previously created a MODIFY_EXPR/GIMPLE_MODIFY_STMT 
only to call gimplify_and_add() immediately after.  As you can see, the
current implementation just calls gimplify_and_add, but Jakub has all
these great ideas on using obstacks and what have yous that should
decrease memory usage immensely.

This patch has been bootstrapped and tested on x86-64 Linux.

Diego, Jakub, I'd like a quick nod before committing.  

I'll be committing similar changes for the other converted back-ends
shortly (ppc, etc), as they are all probably in need of va-arg changes.

Aldy

	* tree-dump.c (dequeue_and_dump): Remove GIMPLE_MODIFY_STMT case.
	* tree-ssa-loop-niter.c (simplify_replace_tree): Remove GIMPLE_STMT_P
	call.
	* tree-pretty-print.c (dump_generic_node): Remove any references to
	GIMPLE_MODIFY_STMT, GIMPLE_STMT_P, GIMPLE_TUPLE_P.
	(op_prio): Same.
	(op_symbol_code): Same.
	* java/java-gimplify.c (java_gimplify_expr): Same.
	(java_gimplify_modify_expr): Same.
	* java/java-tree.h: Rename GENERIC_NEXT to TREE_CHAIN.
	* tree-tailcall.c (find_tail_calls): Update comment.
	* tree.c (tree_code_class_string): Remove "gimple_stmt".
	(tree_node_kind): Remove "gimple statments".
	(tree_code_size): Remove tcc_gimple_stmt.
	(make_node_stat): Same.
	(copy_node_stat): Remove any references to
	GIMPLE_MODIFY_STMT, GIMPLE_STMT_P, GIMPLE_TUPLE_P, tcc_gimple_stmt,
	TS_GIMPLE_STATEMENT, GENERIC_TREE_OPERAND, GENERIC_TREE_TYPE,
	GIMPLE_TUPLE_HAS_LOCUS_P, GIMPLE_STMT_LOCUS, GIMPLE_STMT_BLOCK,
	IS_GIMPLE_STMT_CODE_CLASS, GIMPLE_STMT_BLOCK.
	(expr_align): Same.
	(tree_node_structure): Same.
	(build2_stat): Same.
	(set_expr_locus): Same.
	(walk_tree_1): Same.
	(tree_block): Same.
	(build_gimple_modify_stmt_stat): Remove.
	(expr_location): Remove.
	(set_expr_location): Remove.
	(expr_hash_location): Remove.
	(expr_locus): Remove.
	(expr_filename): Remove.
	(expr_lineno): Remove.
	(generic_tree_operand): Remove.
	(generic_tree_type): Remove.
	* tree.h (tree_code_class): Remove tcc_gimple_stmt.
	(IS_GIMPLE_STMT_CODE_CLASS): Remove.
	(struct gimple_stmt): Remove.
	(GIMPLE_STMT_CHECK): Remove.
	(TREE_OPERAND_CHECK): Remove GIMPLE_TUPLE_P.
	(TREE_CHAIN): Same.
	(GIMPLE_STMT_OPERAND_CHECK): Remove.
	(GIMPLE_STMT_OPERAND_CHECK): Remove.
	(GIMPLE_STMT_P): Remove.
	(GIMPLE_TUPLE_P): Remove.
	(GIMPLE_TUPLE_HAS_LOCUS_P): Remove.
	(GENERIC_TREE_OPERAND): Remove.
	(GENERIC_TREE_TYPE): Remove.
	(GENERIC_NEXT): Remove.
	(IS_CONVERT_EXPR_CODE_P): Rename GENERIC_TREE_TYPE to TREE_TYPE.
	(MOVE_NONTEMPORAL): Remove GIMPLE_MODIFY_STMT_CHECK.
	Remove GIMPLE_STMT_OPERAND, GIMPLE_STMT_LOCUS, GIMPLE_STMT_BLOCK.
	(EXPR_LOCATION, SET_EXPR_LOCATION, EXPR_HAS_LOCATION, EXPR_LOCUS,
	EXPR_FILENAME, EXPR_LINENO): Do ont call functions.
	(CAN_HAVE_LOCATION_P): Remove GIMPLE_STMT_P.
	(union tree_node): Remove gstmt.
	(build_gimple_modify_stmt*): Remove.
	(expr_location, set_expr_location, expr_has_location,
	expr_locus, expr_filename, expr_lineno, generic_tree_operand,
	generic_tree_type): Remove.
	* tree-scalar-evolution.c (follow_ssa_edge): Update comment.
	(interpret_condition_phi): Same.
	* gimple.h (gimplify_assign): New.
	* builtins.c, fold-const.c, omp-low.c, tree-ssa-dse.c, tree-gimple.c,
	tree-ssa-math-opts.c, tree-nrv.c, gimple-low.c, dwarf2out.c,
	expr.c, tree-parloops.c, matrix-reorg.c, c-decl.c, tree-eh.c,
	c-pretty-print.c, langhooks.c, function.c, tree-affine.c,
	gimplify.c, tree.def, cfgexpand.c, tree-predcom.c, print-tree.c,
	tree-ssa-ter.c, tree-ssa.c, tree-inline.c, gimple.c, gimple.h,
	tree-cfg.c, config/i386/i386.c, stmt.c, tree-ssa-operands.c)
	Remove any references to
	GIMPLE_MODIFY_STMT, GIMPLE_STMT_P, GIMPLE_TUPLE_P, tcc_gimple_stmt,
	TS_GIMPLE_STATEMENT, GENERIC_TREE_OPERAND, GENERIC_TREE_TYPE,
	GIMPLE_TUPLE_HAS_LOCUS_P, GIMPLE_STMT_LOCUS, GIMPLE_STMT_BLOCK,
	IS_GIMPLE_STMT_CODE_CLASS, GIMPLE_STMT_BLOCK.
	Call gimplify_assign or generate a GIMPLE_ASSIGN directly when
	appropriate.
	* cp/cp-tree.h (union lang_tree_node): Rename GENERIC_NEXT to
	TREE_CHAIN.
	* cp/cp-gimplify.c (cxx_omp_clause_apply_fn): Rename
	GIMPLE_MODIFY_STMT to MODIFY_EXPR.
	(cxx_omp_clause_copy_ctor): Same.
	(cxx_omp_clause_assign_op): Same.
	* fortran/trans-array.h (gfc_conv_descriptor_data_set_internal):
	Rename to gfc_conv_descriptor_data_set.
	(gfc_conv_descriptor_data_set_tuples): Remove.
	* fortran/trans-array.c (gfc_conv_descriptor_data_get): Rename
	from gfc_conv_descriptor_data_set_internal.
	Remove last argument to gfc_add_modify.
	(gfc_trans_allocate_array_storage): Rename gfc_add_modify_expr to
	gfc_add_modify.
	(gfc_trans_create_temp_array): Same.
	(gfc_conv_array_transpose): Same.
	(gfc_grow_array): Same.
	(gfc_put_offset_into_var): Same.
	(gfc_trans_array_ctor_element): Same.
	(gfc_trans_array_constructor_subarray): Same.
	(gfc_trans_array_constructor_value): Same.
	(gfc_trans_scalarized_loop_end): Same.
	(gfc_array_init_size): Same.
	(gfc_array_allocate): Same.
	(gfc_trans_array_bounds): Same.
	(gfc_trans_auto_array_allocation): Same.
	(gfc_trans_g77_array): Same.
	(gfc_trans_dummy_array_bias): Same.
	(gfc_conv_expr_descriptor): Same.
	(structure_alloc_comps): Same.
	* fortran/trans-expr.c: Same.
	* fortran/trans-openmp.c (gfc_omp_clause_default_ctor): Same.
	Rename gfc_conv_descriptor_data_set_tuples to
	gfc_conv_descriptor_data_set.
	(gfc_omp_clause_copy_ctor): Change build_gimple_modify_stmt to
	build2_v.
	(gfc_omp_clause_assign_op): Same.
	(gfc_trans_omp_array_reduction): Rename gfc_add_modify_expr to
	gfc_add_modify.
	(gfc_trans_omp_atomic): Same.
	(gfc_trans_omp_do): Same.  Change GIMPLE_MODIFY_STMT to MODIFY_EXPR.
	Rename gfc_add_modify_stmt to gfc_add_modify.
	* fortran/trans-stmt.c: Rename gfc_add_modify_expr to
	gfc_add_modify.
	* fortran/trans.c 
	trans.c: Rename gfc_add_modify_expr to
	gfc_add_modify.
	(gfc_add_modify): Remove last argument.
	Rename GIMPLE_MODIFY_STMT to MODIFY_EXPR.
	* fortran/trans.h: Remove gfc_add_modify_expr, gfc_add_modify_stmt.
	Add prototype for gfc_add_modify.
	* fortran/f95-lang.c (union lang_tree_node): Rename GENERIC_NEXT
	to TREE_CHAIN.
	* fortran/trans-decl.c: Rename gfc_add_modify_stmt to gfc_add_modify.
	* fortran/trans-io.c: Same.
	* fortran/trans-intrinsic.c: Same.

Index: tree-dump.c
===================================================================
--- tree-dump.c	(revision 137784)
+++ tree-dump.c	(working copy)
@@ -598,11 +598,6 @@ dequeue_and_dump (dump_info_p di)
       dump_child ("op 1", TREE_OPERAND (t, 1));
       break;
 
-    case GIMPLE_MODIFY_STMT:
-      dump_child ("op 0", GIMPLE_STMT_OPERAND (t, 0));
-      dump_child ("op 1", GIMPLE_STMT_OPERAND (t, 1));
-      break;
-
     case COMPONENT_REF:
       dump_child ("op 0", TREE_OPERAND (t, 0));
       dump_child ("op 1", TREE_OPERAND (t, 1));
Index: tree-ssa-loop-niter.c
===================================================================
--- tree-ssa-loop-niter.c	(revision 137784)
+++ tree-ssa-loop-niter.c	(working copy)
@@ -1348,7 +1348,7 @@ simplify_replace_tree (tree expr, tree o
       || operand_equal_p (expr, old, 0))
     return unshare_expr (new_tree);
 
-  if (!EXPR_P (expr) && !GIMPLE_STMT_P (expr))
+  if (!EXPR_P (expr))
     return expr;
 
   n = TREE_OPERAND_LENGTH (expr);
Index: tree-pretty-print.c
===================================================================
--- tree-pretty-print.c	(revision 137784)
+++ tree-pretty-print.c	(working copy)
@@ -441,7 +441,7 @@ dump_generic_node (pretty_printer *buffe
   if (node == NULL_TREE)
     return spc;
 
-  is_expr = EXPR_P (node) || GIMPLE_STMT_P (node);
+  is_expr = EXPR_P (node);
 
   if (is_stmt && (flags & TDF_STMTADDR))
     pp_printf (buffer, "<&%p> ", (void *)node);
@@ -1054,17 +1054,16 @@ dump_generic_node (pretty_printer *buffe
       break;
 
     case MODIFY_EXPR:
-    case GIMPLE_MODIFY_STMT:
     case INIT_EXPR:
-      dump_generic_node (buffer, GENERIC_TREE_OPERAND (node, 0), spc, flags,
+      dump_generic_node (buffer, TREE_OPERAND (node, 0), spc, flags,
 	  		 false);
       pp_space (buffer);
       pp_character (buffer, '=');
-      if (TREE_CODE (node) == GIMPLE_MODIFY_STMT
+      if (TREE_CODE (node) == MODIFY_EXPR
 	  && MOVE_NONTEMPORAL (node))
 	pp_string (buffer, "{nt}");
       pp_space (buffer);
-      dump_generic_node (buffer, GENERIC_TREE_OPERAND (node, 1), spc, flags,
+      dump_generic_node (buffer, TREE_OPERAND (node, 1), spc, flags,
 	  		 false);
       break;
 
@@ -1574,9 +1573,8 @@ dump_generic_node (pretty_printer *buffe
       if (op0)
 	{
 	  pp_space (buffer);
-	  if (TREE_CODE (op0) == MODIFY_EXPR
-	      || TREE_CODE (op0) == GIMPLE_MODIFY_STMT)
-	    dump_generic_node (buffer, GENERIC_TREE_OPERAND (op0, 1),
+	  if (TREE_CODE (op0) == MODIFY_EXPR)
+	    dump_generic_node (buffer, TREE_OPERAND (op0, 1),
 			       spc, flags, false);
 	  else
 	    dump_generic_node (buffer, op0, spc, flags, false);
@@ -2263,7 +2261,6 @@ op_prio (const_tree op)
       return 1;
 
     case MODIFY_EXPR:
-    case GIMPLE_MODIFY_STMT:
     case INIT_EXPR:
       return 2;
 
@@ -2397,7 +2394,6 @@ op_symbol_code (enum tree_code code)
   switch (code)
     {
     case MODIFY_EXPR:
-    case GIMPLE_MODIFY_STMT:
       return "=";
 
     case TRUTH_OR_EXPR:
Index: java/java-gimplify.c
===================================================================
--- java/java-gimplify.c	(revision 137784)
+++ java/java-gimplify.c	(working copy)
@@ -68,9 +68,6 @@ java_gimplify_expr (tree *expr_p, gimple
       *expr_p = java_replace_reference (*expr_p, /* want_lvalue */ false);
       return GS_UNHANDLED;
 
-      /* We don't handle GIMPLE_MODIFY_STMT, as MODIFY_EXPRs with java
-         semantics should only be generated by the front-end, and never
-         by anything after gimplification.  */
     case MODIFY_EXPR:
       return java_gimplify_modify_expr (expr_p);
 
@@ -142,7 +139,7 @@ java_gimplify_modify_expr (tree *modify_
     {
       tree new_lhs = java_replace_reference (lhs, /* want_lvalue */ true);
       tree new_rhs = build1 (NOP_EXPR, TREE_TYPE (new_lhs), rhs);
-      modify_expr = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (new_lhs),
+      modify_expr = build2 (MODIFY_EXPR, TREE_TYPE (new_lhs),
 			    new_lhs, new_rhs);
       modify_expr = build1 (NOP_EXPR, lhs_type, modify_expr);
     }
Index: java/java-tree.h
===================================================================
--- java/java-tree.h	(revision 137784)
+++ java/java-tree.h	(working copy)
@@ -649,7 +649,7 @@ struct lang_identifier GTY(())
 /* The resulting tree type.  */
 union lang_tree_node 
   GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"),
-       chain_next ("(union lang_tree_node *)GENERIC_NEXT (&%h.generic)")))
+       chain_next ("(union lang_tree_node *)TREE_CHAIN (&%h.generic)")))
 
 {
   union tree_node GTY ((tag ("0"), 
Index: tree-tailcall.c
===================================================================
--- tree-tailcall.c	(revision 137784)
+++ tree-tailcall.c	(working copy)
@@ -462,7 +462,7 @@ find_tail_calls (basic_block bb, struct 
 		 of copying the value.  This test implies is_gimple_reg_type
 		 from the previous condition, however this one could be
 		 relaxed by being more careful with copying the new value
-		 of the parameter (emitting appropriate GIMPLE_MODIFY_STMT and
+		 of the parameter (emitting appropriate GIMPLE_ASSIGN and
 		 updating the virtual operands).  */
 	      if (!is_gimple_reg (param))
 		break;
Index: tree.c
===================================================================
--- tree.c	(revision 137784)
+++ tree.c	(working copy)
@@ -105,8 +105,7 @@ const char *const tree_code_class_string
   "binary",
   "statement",
   "vl_exp",
-  "expression",
-  "gimple_stmt"
+  "expression"
 };
 
 /* obstack.[ch] explicitly declined to prototype this.  */
@@ -138,7 +137,6 @@ static const char * const tree_node_kind
   "lang_decl kinds",
   "lang_type kinds",
   "omp clauses",
-  "gimple statements"
 };
 #endif /* GATHER_STATISTICS */
 
@@ -427,10 +425,6 @@ tree_code_size (enum tree_code code)
       return (sizeof (struct tree_exp)
 	      + (TREE_CODE_LENGTH (code) - 1) * sizeof (tree));
 
-    case tcc_gimple_stmt:
-      return (sizeof (struct gimple_stmt)
-	      + (TREE_CODE_LENGTH (code) - 1) * sizeof (char *));
-
     case tcc_constant:  /* a constant */
       switch (code)
 	{
@@ -549,10 +543,6 @@ make_node_stat (enum tree_code code MEM_
       kind = c_kind;
       break;
 
-    case tcc_gimple_stmt:
-      kind = gimple_stmt_kind;
-      break;
-
     case tcc_exceptional:  /* something random, like an identifier.  */
       switch (code)
 	{
@@ -668,17 +658,6 @@ make_node_stat (enum tree_code code MEM_
 	}
       break;
 
-    case tcc_gimple_stmt:
-      switch (code)
-	{
-      case GIMPLE_MODIFY_STMT:
-	TREE_SIDE_EFFECTS (t) = 1;
-	break;
-
-      default:
-	break;
-	}
-
     default:
       /* Other classes need no special treatment.  */
       break;
@@ -703,8 +682,7 @@ copy_node_stat (tree node MEM_STAT_DECL)
   t = (tree) ggc_alloc_zone_pass_stat (length, &tree_zone);
   memcpy (t, node, length);
 
-  if (!GIMPLE_TUPLE_P (node))
-    TREE_CHAIN (t) = 0;
+  TREE_CHAIN (t) = 0;
   TREE_ASM_WRITTEN (t) = 0;
   TREE_VISITED (t) = 0;
   t->base.ann = 0;
@@ -1972,10 +1950,6 @@ expr_align (const_tree t)
       align1 = TYPE_ALIGN (TREE_TYPE (t));
       return MAX (align0, align1);
 
-    case GIMPLE_MODIFY_STMT:
-      /* We should never ask for the alignment of a gimple statement.  */
-      gcc_unreachable ();
-
     case SAVE_EXPR:         case COMPOUND_EXPR:       case MODIFY_EXPR:
     case INIT_EXPR:         case TARGET_EXPR:         case WITH_CLEANUP_EXPR:
     case CLEANUP_POINT_EXPR:
@@ -2347,8 +2321,6 @@ tree_node_structure (const_tree t)
     case tcc_statement:
     case tcc_vl_exp:
       return TS_EXP;
-    case tcc_gimple_stmt:
-      return TS_GIMPLE_STATEMENT;
     default:  /* tcc_constant and tcc_exceptional */
       break;
     }
@@ -3213,15 +3185,6 @@ build2_stat (enum tree_code code, tree t
 
   gcc_assert (TREE_CODE_LENGTH (code) == 2);
 
-#if 1
-  /* FIXME tuples: Statement's aren't expressions!  */
-  if (code == GIMPLE_MODIFY_STMT)
-    return build_gimple_modify_stmt_stat (arg0, arg1 PASS_MEM_STAT);
-#else
-  /* Must use build_gimple_modify_stmt to construct GIMPLE_MODIFY_STMTs.  */
-  gcc_assert (code != GIMPLE_MODIFY_STMT);
-#endif
-
   if ((code == MINUS_EXPR || code == PLUS_EXPR || code == MULT_EXPR)
       && arg0 && arg1 && tt && POINTER_TYPE_P (tt))
     gcc_assert (TREE_CODE (arg0) == INTEGER_CST && TREE_CODE (arg1) == INTEGER_CST);
@@ -3260,23 +3223,6 @@ build2_stat (enum tree_code code, tree t
 }
 
 
-/* Build a GIMPLE_MODIFY_STMT node.  This tree code doesn't have a
-   type, so we can't use build2 (a.k.a. build2_stat).  */
-
-tree
-build_gimple_modify_stmt_stat (tree arg0, tree arg1 MEM_STAT_DECL)
-{
-  /* FIXME tuples.  Deprecate this.  There should not be any calls to this
-     routine.  Use gimple_build_assign instead.  */
-  tree t;
-
-  t = make_node_stat (GIMPLE_MODIFY_STMT PASS_MEM_STAT);
-  /* ?? We don't care about setting flags for tuples...  */
-  GIMPLE_STMT_OPERAND (t, 0) = arg0;
-  GIMPLE_STMT_OPERAND (t, 1) = arg1;
-  return t;
-}
-
 tree
 build3_stat (enum tree_code code, tree tt, tree arg0, tree arg1,
 	     tree arg2 MEM_STAT_DECL)
@@ -3525,79 +3471,14 @@ expand_location (source_location loc)
 /* Source location accessor functions.  */
 
 
-/* The source location of this expression.  Non-tree_exp nodes such as
-   decls and constants can be shared among multiple locations, so
-   return nothing.  */
-location_t
-expr_location (const_tree node)
-{
-  if (GIMPLE_STMT_P (node))
-    return GIMPLE_STMT_LOCUS (node);
-  return EXPR_P (node) ? node->exp.locus : UNKNOWN_LOCATION;
-}
-
-void
-set_expr_location (tree node, location_t locus)
-{
-  if (GIMPLE_STMT_P (node))
-    GIMPLE_STMT_LOCUS (node) = locus;
-  else
-    EXPR_CHECK (node)->exp.locus = locus;
-}
-
-bool
-expr_has_location (const_tree node)
-{
-  return expr_location (node) != UNKNOWN_LOCATION;
-}
-
-source_location *
-expr_locus (const_tree node)
-{
-  if (GIMPLE_STMT_P (node))
-    return CONST_CAST (source_location *, &GIMPLE_STMT_LOCUS (node));
-  return (EXPR_P (node)
-	  ? CONST_CAST (source_location *, &node->exp.locus)
-	  : (source_location *) NULL);
-}
-
 void
 set_expr_locus (tree node, source_location *loc)
 {
   if (loc == NULL)
-    {
-      if (GIMPLE_STMT_P (node))
-	GIMPLE_STMT_LOCUS (node) = UNKNOWN_LOCATION;
-      else
-	EXPR_CHECK (node)->exp.locus = UNKNOWN_LOCATION;
-    }
+    EXPR_CHECK (node)->exp.locus = UNKNOWN_LOCATION;
   else
-    {
-      if (GIMPLE_STMT_P (node))
-	GIMPLE_STMT_LOCUS (node) = *loc;
-      else
-	EXPR_CHECK (node)->exp.locus = *loc;
-    }
-}
-
-/* Return the file name of the location of NODE.  */
-const char *
-expr_filename (const_tree node)
-{
-  if (GIMPLE_STMT_P (node))
-    return LOCATION_FILE (GIMPLE_STMT_LOCUS (node));
-  return LOCATION_FILE (EXPR_CHECK (node)->exp.locus);
-}
-
-/* Return the line number of the location of NODE.  */
-int
-expr_lineno (const_tree node)
-{
-  if (GIMPLE_STMT_P (node))
-    return LOCATION_LINE (GIMPLE_STMT_LOCUS (node));
-  return LOCATION_LINE (EXPR_CHECK (node)->exp.locus);
+    EXPR_CHECK (node)->exp.locus = *loc;
 }
-
 
 /* Return a declaration like DDECL except that its DECL_ATTRIBUTES
    is ATTRIBUTE.  */
@@ -8682,8 +8563,7 @@ walk_tree_1 (tree *tp, walk_tree_fn func
       /* FALLTHRU */
 
     default:
-      if (IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (code))
-	  || IS_GIMPLE_STMT_CODE_CLASS (TREE_CODE_CLASS (code)))
+      if (IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (code)))
 	{
 	  int i, len;
 
@@ -8695,8 +8575,8 @@ walk_tree_1 (tree *tp, walk_tree_fn func
 	  if (len)
 	    {
 	      for (i = 0; i < len - 1; ++i)
-		WALK_SUBTREE (GENERIC_TREE_OPERAND (*tp, i));
-	      WALK_SUBTREE_TAIL (GENERIC_TREE_OPERAND (*tp, len - 1));
+		WALK_SUBTREE (TREE_OPERAND (*tp, i));
+	      WALK_SUBTREE_TAIL (TREE_OPERAND (*tp, len - 1));
 	    }
 	}
       /* If this is a type, walk the needed fields in the type.  */
@@ -8735,28 +8615,10 @@ tree_block (tree t)
 
   if (IS_EXPR_CODE_CLASS (c))
     return &t->exp.block;
-  else if (IS_GIMPLE_STMT_CODE_CLASS (c))
-    return &GIMPLE_STMT_BLOCK (t);
   gcc_unreachable ();
   return NULL;
 }
 
-tree *
-generic_tree_operand (tree node, int i)
-{
-  if (GIMPLE_STMT_P (node))
-    return &GIMPLE_STMT_OPERAND (node, i);
-  return &TREE_OPERAND (node, i);
-}
-
-tree *
-generic_tree_type (tree node)
-{
-  if (GIMPLE_STMT_P (node))
-    return &void_type_node;
-  return &TREE_TYPE (node);
-}
-
 /* Build and return a TREE_LIST of arguments in the CALL_EXPR exp.
    FIXME: don't use this function.  It exists for compatibility with
    the old representation of CALL_EXPRs where a list was used to hold the
Index: tree.h
===================================================================
--- tree.h	(revision 137784)
+++ tree.h	(working copy)
@@ -68,8 +68,7 @@ enum tree_code_class {
 		      but usually no interesting value.  */
   tcc_vl_exp,      /* A function call or other expression with a
 		      variable-length operand vector.  */
-  tcc_expression,  /* Any other expression.  */
-  tcc_gimple_stmt  /* A GIMPLE statement.  */
+  tcc_expression   /* Any other expression.  */
 };
 
 /* Each tree code class has an associated string representation.
@@ -173,10 +172,6 @@ extern const enum tree_code_class tree_c
 #define IS_EXPR_CODE_CLASS(CLASS)\
 	((CLASS) >= tcc_reference && (CLASS) <= tcc_expression)
 
-/* Returns nonzero iff CLASS is a GIMPLE statement.  */
-
-#define IS_GIMPLE_STMT_CODE_CLASS(CLASS) ((CLASS) == tcc_gimple_stmt)
-
 /* Returns nonzero iff NODE is an expression of some kind.  */
 
 #define EXPR_P(NODE) IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (TREE_CODE (NODE)))
@@ -398,15 +393,6 @@ struct tree_common GTY(())
   tree type;
 };
 
-/* GIMPLE_MODIFY_STMT */
-struct gimple_stmt GTY(())
-{
-  struct tree_base base;
-  location_t locus;
-  tree block;
-  tree GTY ((length ("TREE_CODE_LENGTH (TREE_CODE (&%h))"))) operands[1];
-};
-
 /* The following table lists the uses of each of the above flags and
    for which types of nodes they are defined.
 
@@ -455,7 +441,7 @@ struct gimple_stmt GTY(())
            POINTER_TYPE, REFERENCE_TYPE
 
        MOVE_NONTEMPORAL in
-           GIMPLE_MODIFY_STMT
+           MODIFY_EXPR
 
        CASE_HIGH_SEEN in
            CASE_LABEL_EXPR
@@ -790,14 +776,6 @@ enum tree_node_structure_enum {
 			       __FUNCTION__);				\
     __t; })
 
-#define GIMPLE_STMT_CHECK(T) __extension__				\
-({  __typeof (T) const __t = (T);					\
-    char const __c = TREE_CODE_CLASS (TREE_CODE (__t));			\
-    if (!IS_GIMPLE_STMT_CODE_CLASS (__c))				\
-      tree_class_check_failed (__t, tcc_gimple_stmt, __FILE__, __LINE__,\
-			       __FUNCTION__);				\
-    __t; })
-
 /* These checks have to be special cased.  */
 #define NON_TYPE_CHECK(T) __extension__					\
 ({  __typeof (T) const __t = (T);					\
@@ -832,8 +810,6 @@ enum tree_node_structure_enum {
 #define TREE_OPERAND_CHECK(T, I) __extension__				\
 (*({__typeof (T) const __t = EXPR_CHECK (T);				\
     const int __i = (I);						\
-    if (GIMPLE_TUPLE_P (__t))						\
-      gcc_unreachable ();						\
     if (__i < 0 || __i >= TREE_OPERAND_LENGTH (__t))			\
       tree_operand_check_failed (__i, __t,				\
 				 __FILE__, __LINE__, __FUNCTION__);	\
@@ -849,15 +825,6 @@ enum tree_node_structure_enum {
 				 __FILE__, __LINE__, __FUNCTION__);	\
     &__t->exp.operands[__i]; }))
 
-/* Special checks for GIMPLE_STMT_OPERANDs.  */
-#define GIMPLE_STMT_OPERAND_CHECK(T, I) __extension__			\
-(*({__typeof (T) const __t = GIMPLE_STMT_CHECK (T);			\
-    const int __i = (I);						\
-    if (__i < 0 || __i >= TREE_OPERAND_LENGTH (__t))			\
-      tree_operand_check_failed (__i, __t,				\
-				 __FILE__, __LINE__, __FUNCTION__);	\
-    &__t->gstmt.operands[__i]; }))
-
 #define TREE_RTL_OPERAND_CHECK(T, CODE, I) __extension__		\
 (*(rtx *)								\
  ({__typeof (T) const __t = (T);					\
@@ -880,8 +847,6 @@ enum tree_node_structure_enum {
 
 #define TREE_CHAIN(NODE) __extension__ \
 (*({__typeof (NODE) const __t = (NODE);				\
-    if (GIMPLE_TUPLE_P (__t))					\
-      gcc_unreachable ();					\
     &__t->common.chain; }))
 
 /* In all nodes that are expressions, this is the data type of the expression.
@@ -890,8 +855,6 @@ enum tree_node_structure_enum {
    In VECTOR_TYPE nodes, this is the type of the elements.  */
 #define TREE_TYPE(NODE) __extension__ \
 (*({__typeof (NODE) const __t = (NODE);					\
-    if (GIMPLE_TUPLE_P (__t))					\
-      gcc_unreachable ();					\
     &__t->common.type; }))
 
 extern void tree_contains_struct_check_failed (const_tree,
@@ -949,12 +912,10 @@ extern void omp_clause_range_check_faile
 #define TREE_CLASS_CHECK(T, CODE)		(T)
 #define TREE_RANGE_CHECK(T, CODE1, CODE2)	(T)
 #define EXPR_CHECK(T)				(T)
-#define GIMPLE_STMT_CHECK(T)			(T)
 #define NON_TYPE_CHECK(T)			(T)
 #define TREE_VEC_ELT_CHECK(T, I)		((T)->vec.a[I])
 #define TREE_OPERAND_CHECK(T, I)		((T)->exp.operands[I])
 #define TREE_OPERAND_CHECK_CODE(T, CODE, I)	((T)->exp.operands[I])
-#define GIMPLE_STMT_OPERAND_CHECK(T, I)		((T)->gstmt.operands[I])
 #define TREE_RTL_OPERAND_CHECK(T, CODE, I)  (*(rtx *) &((T)->exp.operands[I]))
 #define OMP_CLAUSE_ELT_CHECK(T, i)	        ((T)->omp_clause.ops[i])
 #define OMP_CLAUSE_RANGE_CHECK(T, CODE1, CODE2)	(T)
@@ -991,27 +952,6 @@ extern void omp_clause_range_check_faile
   TREE_CHECK5 (T, INTEGER_TYPE, ENUMERAL_TYPE, BOOLEAN_TYPE, REAL_TYPE,	\
 	       FIXED_POINT_TYPE)
 
-/* Nonzero if NODE is a GIMPLE statement.  */
-#define GIMPLE_STMT_P(NODE) \
-  (TREE_CODE_CLASS (TREE_CODE ((NODE))) == tcc_gimple_stmt)
-
-/* Nonzero if NODE is a GIMPLE tuple.  */
-#define GIMPLE_TUPLE_P(NODE) GIMPLE_STMT_P (NODE)
-
-/* A GIMPLE tuple that has a ``locus'' field.  */
-#define GIMPLE_TUPLE_HAS_LOCUS_P(NODE) GIMPLE_STMT_P ((NODE))
-
-/* Like TREE_OPERAND but works with GIMPLE stmt tuples as well.
-
-   If you know the NODE is a GIMPLE statement, use GIMPLE_STMT_OPERAND.  If the
-   NODE code is unknown at compile time, use this macro.  */
-#define GENERIC_TREE_OPERAND(NODE, I) *(generic_tree_operand ((NODE), (I)))
-
-/* Like TREE_TYPE but returns void_type_node for gimple tuples that have
-   no type.  */
-
-#define GENERIC_TREE_TYPE(NODE) *(generic_tree_type ((NODE)))
-
 /* Here is how primitive or already-canonicalized types' hash codes
    are made.  */
 #define TYPE_HASH(TYPE) (TYPE_UID (TYPE))
@@ -1020,10 +960,6 @@ extern void omp_clause_range_check_faile
    used in hash tables which are saved to a PCH.  */
 #define TREE_HASH(NODE) ((size_t) (NODE) & 0777777)
 
-/* The TREE_CHAIN but it is able to handle tuples.  */
-#define GENERIC_NEXT(NODE)					\
-  (GIMPLE_STMT_P (NODE) ? NULL_TREE : TREE_CHAIN (NODE))
-
 /* Tests if CODE is a conversion expr (NOP_EXPR or CONVERT_EXPR).  */
 #define IS_CONVERT_EXPR_CODE_P(CODE)				\
   ((CODE) == NOP_EXPR || (CODE) == CONVERT_EXPR)
@@ -1045,7 +981,7 @@ extern void omp_clause_range_check_faile
 	  || TREE_CODE (EXP) == NON_LVALUE_EXPR)		\
 	 && TREE_OPERAND (EXP, 0) != error_mark_node		\
 	 && (TYPE_MODE (TREE_TYPE (EXP))			\
-	     == TYPE_MODE (GENERIC_TREE_TYPE (TREE_OPERAND (EXP, 0))))) \
+	     == TYPE_MODE (TREE_TYPE (TREE_OPERAND (EXP, 0))))) \
     (EXP) = TREE_OPERAND (EXP, 0)
 
 /* Like STRIP_NOPS, but don't let the signedness change either.  */
@@ -1242,7 +1178,7 @@ extern void omp_clause_range_check_faile
 
 /* In a MODIFY_EXPR, means that the store in the expression is nontemporal.  */
 #define MOVE_NONTEMPORAL(NODE) \
-  (GIMPLE_MODIFY_STMT_CHECK (NODE)->base.static_flag)
+  (EXPR_CHECK (NODE)->base.static_flag)
 
 /* In an INTEGER_CST, REAL_CST, COMPLEX_CST, or VECTOR_CST, this means
    there was an overflow in folding.  */
@@ -1621,28 +1557,25 @@ struct tree_constructor GTY(())
 #define VL_EXP_OPERAND_LENGTH(NODE) \
   ((int)TREE_INT_CST_LOW (VL_EXP_CHECK (NODE)->exp.operands[0]))
 
-/* In gimple statements.  */
-#define GIMPLE_STMT_OPERAND(NODE, I) GIMPLE_STMT_OPERAND_CHECK (NODE, I)
-#define GIMPLE_STMT_LOCUS(NODE) (GIMPLE_STMT_CHECK (NODE)->gstmt.locus)
-#define GIMPLE_STMT_BLOCK(NODE) (GIMPLE_STMT_CHECK (NODE)->gstmt.block)
-
 /* In a LOOP_EXPR node.  */
 #define LOOP_EXPR_BODY(NODE) TREE_OPERAND_CHECK_CODE (NODE, LOOP_EXPR, 0)
 
 /* The source location of this expression.  Non-tree_exp nodes such as
    decls and constants can be shared among multiple locations, so
    return nothing.  */
-#define EXPR_LOCATION(NODE) expr_location ((NODE))
-#define SET_EXPR_LOCATION(NODE, FROM) set_expr_location ((NODE), (FROM))
-#define EXPR_HAS_LOCATION(NODE) expr_has_location ((NODE))
-#define EXPR_LOCUS(NODE) expr_locus ((NODE))
+#define EXPR_LOCATION(NODE) (EXPR_P ((NODE)) ? (NODE)->exp.locus : UNKNOWN_LOCATION)
+#define SET_EXPR_LOCATION(NODE, LOCUS) EXPR_CHECK ((NODE))->exp.locus = (LOCUS)
+#define EXPR_HAS_LOCATION(NODE) (EXPR_LOCATION (NODE) != UNKNOWN_LOCATION)
+#define EXPR_LOCUS(NODE) (EXPR_P (NODE) \
+			  ? CONST_CAST (source_location *, &(NODE)->exp.locus) \
+			  : (source_location *) NULL)
 #define SET_EXPR_LOCUS(NODE, FROM) set_expr_locus ((NODE), (FROM))
-#define EXPR_FILENAME(NODE) (expr_filename ((NODE)))
-#define EXPR_LINENO(NODE) (expr_lineno ((NODE)))
+#define EXPR_FILENAME(NODE) LOCATION_FILE (EXPR_CHECK ((NODE))->exp.locus)
+#define EXPR_LINENO(NODE) LOCATION_LINE (EXPR_CHECK (NODE)->exp.locus)
 
 /* True if a tree is an expression or statement that can have a
    location.  */
-#define CAN_HAVE_LOCATION_P(NODE) (EXPR_P (NODE) || GIMPLE_STMT_P (NODE))
+#define CAN_HAVE_LOCATION_P(NODE) (EXPR_P (NODE))
 
 /* In a TARGET_EXPR node.  */
 #define TARGET_EXPR_SLOT(NODE) TREE_OPERAND_CHECK_CODE (NODE, TARGET_EXPR, 0)
@@ -3456,7 +3389,6 @@ union tree_node GTY ((ptr_alias (union l
   struct tree_block GTY ((tag ("TS_BLOCK"))) block;
   struct tree_binfo GTY ((tag ("TS_BINFO"))) binfo;
   struct tree_statement_list GTY ((tag ("TS_STATEMENT_LIST"))) stmt_list;
-  struct gimple_stmt GTY ((tag ("TS_GIMPLE_STATEMENT"))) gstmt;
   struct tree_constructor GTY ((tag ("TS_CONSTRUCTOR"))) constructor;
   struct tree_memory_tag GTY ((tag ("TS_MEMORY_TAG"))) mtag;
   struct tree_omp_clause GTY ((tag ("TS_OMP_CLAUSE"))) omp_clause;
@@ -3933,10 +3865,6 @@ extern tree build7_stat (enum tree_code,
 #define build7(c,t1,t2,t3,t4,t5,t6,t7,t8) \
   build7_stat (c,t1,t2,t3,t4,t5,t6,t7,t8 MEM_STAT_INFO)
 
-extern tree build_gimple_modify_stmt_stat (tree, tree MEM_STAT_DECL);
-#define build_gimple_modify_stmt(t1,t2) \
-  build_gimple_modify_stmt_stat (t1,t2 MEM_STAT_INFO)
-
 extern tree build_int_cst (tree, HOST_WIDE_INT);
 extern tree build_int_cst_type (tree, HOST_WIDE_INT);
 extern tree build_int_cstu (tree, unsigned HOST_WIDE_INT);
@@ -4905,18 +4833,9 @@ extern tree build_addr (tree, tree);
 extern bool fields_compatible_p (const_tree, const_tree);
 extern tree find_compatible_field (tree, tree);
 
-extern location_t expr_location (const_tree);
-extern void set_expr_location (tree, location_t);
-extern bool expr_has_location (const_tree);
-
-extern location_t *expr_locus (const_tree);
 extern void set_expr_locus (tree, source_location *);
-extern const char *expr_filename (const_tree);
-extern int expr_lineno (const_tree);
 
 extern tree *tree_block (tree);
-extern tree *generic_tree_operand (tree, int);
-extern tree *generic_tree_type (tree);
 extern location_t *block_nonartificial_location (tree);
 
 /* In function.c */
@@ -5141,7 +5060,6 @@ typedef enum
   lang_decl,
   lang_type,
   omp_clause_kind,
-  gimple_stmt_kind,
   all_kinds
 } tree_node_kind;
 
Index: tree-scalar-evolution.c
===================================================================
--- tree-scalar-evolution.c	(revision 137784)
+++ tree-scalar-evolution.c	(working copy)
@@ -48,7 +48,7 @@ along with GCC; see the file COPYING3.  
    Given a scalar variable to be analyzed, follow the SSA edge to
    its definition:
      
-   - When the definition is a GIMPLE_MODIFY_STMT: if the right hand side
+   - When the definition is a GIMPLE_ASSIGN: if the right hand side
    (RHS) of the definition cannot be statically analyzed, the answer
    of the analyzer is: "don't know".  
    Otherwise, for all the variables that are not yet analyzed in the
@@ -1433,7 +1433,7 @@ follow_ssa_edge (struct loop *loop, gimp
       
     default:
       /* At this level of abstraction, the program is just a set
-	 of GIMPLE_MODIFY_STMTs and PHI_NODEs.  In principle there is no
+	 of GIMPLE_ASSIGNs and PHI_NODEs.  In principle there is no
 	 other node to be handled.  */
       return t_false;
     }
@@ -1631,7 +1631,7 @@ interpret_condition_phi (struct loop *lo
 
 /* Interpret the operation RHS1 OP RHS2.  If we didn't
    analyze this node before, follow the definitions until ending
-   either on an analyzed GIMPLE_MODIFY_STMT, or on a loop-phi-node.  On the
+   either on an analyzed GIMPLE_ASSIGN, or on a loop-phi-node.  On the
    return path, this function propagates evolutions (ala constant copy
    propagation).  OPND1 is not a GIMPLE expression because we could
    analyze the effect of an inner loop: see interpret_loop_phi.  */
Index: builtins.c
===================================================================
--- builtins.c	(revision 137784)
+++ builtins.c	(working copy)
@@ -7293,7 +7293,7 @@ integer_valued_real_p (tree t)
     case COMPOUND_EXPR:
     case MODIFY_EXPR:
     case BIND_EXPR:
-      return integer_valued_real_p (GENERIC_TREE_OPERAND (t, 1));
+      return integer_valued_real_p (TREE_OPERAND (t, 1));
 
     case PLUS_EXPR:
     case MINUS_EXPR:
@@ -10573,7 +10573,7 @@ fold_builtin_n (tree fndecl, tree *args,
     }
   if (ret)
     {
-      ret = build1 (NOP_EXPR, GENERIC_TREE_TYPE (ret), ret);
+      ret = build1 (NOP_EXPR, TREE_TYPE (ret), ret);
       TREE_NO_WARNING (ret) = 1;
       return ret;
     }
Index: fold-const.c
===================================================================
--- fold-const.c	(revision 137784)
+++ fold-const.c	(working copy)
@@ -2640,7 +2640,7 @@ fold_convert (tree type, tree arg)
 
     case VOID_TYPE:
       tem = fold_ignored_result (arg);
-      if (TREE_CODE (tem) == GIMPLE_MODIFY_STMT)
+      if (TREE_CODE (tem) == MODIFY_EXPR)
 	return tem;
       return fold_build1 (NOP_EXPR, type, tem);
 
@@ -2683,7 +2683,6 @@ maybe_lvalue_p (const_tree x)
   case WITH_CLEANUP_EXPR:
   case COMPOUND_EXPR:
   case MODIFY_EXPR:
-  case GIMPLE_MODIFY_STMT:
   case TARGET_EXPR:
   case COND_EXPR:
   case BIND_EXPR:
@@ -7848,17 +7847,16 @@ fold_unary (enum tree_code code, tree ty
 	    return fold_convert (type, fold_addr_expr (base));
         }
 
-      if ((TREE_CODE (op0) == MODIFY_EXPR
-	   || TREE_CODE (op0) == GIMPLE_MODIFY_STMT)
-	  && TREE_CONSTANT (GENERIC_TREE_OPERAND (op0, 1))
+      if (TREE_CODE (op0) == MODIFY_EXPR
+	  && TREE_CONSTANT (TREE_OPERAND (op0, 1))
 	  /* Detect assigning a bitfield.  */
-	  && !(TREE_CODE (GENERIC_TREE_OPERAND (op0, 0)) == COMPONENT_REF
+	  && !(TREE_CODE (TREE_OPERAND (op0, 0)) == COMPONENT_REF
 	       && DECL_BIT_FIELD
-	       (TREE_OPERAND (GENERIC_TREE_OPERAND (op0, 0), 1))))
+	       (TREE_OPERAND (TREE_OPERAND (op0, 0), 1))))
 	{
 	  /* Don't leave an assignment inside a conversion
 	     unless assigning a bitfield.  */
-	  tem = fold_build1 (code, type, GENERIC_TREE_OPERAND (op0, 1));
+	  tem = fold_build1 (code, type, TREE_OPERAND (op0, 1));
 	  /* First do the assignment, then return converted constant.  */
 	  tem = build2 (COMPOUND_EXPR, TREE_TYPE (tem), op0, tem);
 	  TREE_NO_WARNING (tem) = 1;
@@ -9250,8 +9248,7 @@ fold_binary (enum tree_code code, tree t
   tree t1 = NULL_TREE;
   bool strict_overflow_p;
 
-  gcc_assert ((IS_EXPR_CODE_CLASS (kind)
-	       || IS_GIMPLE_STMT_CODE_CLASS (kind))
+  gcc_assert (IS_EXPR_CODE_CLASS (kind)
 	      && TREE_CODE_LENGTH (code) == 2
 	      && op0 != NULL_TREE
 	      && op1 != NULL_TREE);
@@ -13170,8 +13167,7 @@ fold (tree expr)
       return expr;
     }
 
-  if (IS_EXPR_CODE_CLASS (kind)
-      || IS_GIMPLE_STMT_CODE_CLASS (kind))
+  if (IS_EXPR_CODE_CLASS (kind))
     {
       tree type = TREE_TYPE (t);
       tree op0, op1, op2;
@@ -14274,10 +14270,9 @@ tree_invalid_nonnegative_warnv_p (tree t
 	    else
 	      break;
 	  }
-	if ((TREE_CODE (t) == MODIFY_EXPR
-	     || TREE_CODE (t) == GIMPLE_MODIFY_STMT)
-	    && GENERIC_TREE_OPERAND (t, 0) == temp)
-	  return tree_expr_nonnegative_warnv_p (GENERIC_TREE_OPERAND (t, 1),
+	if (TREE_CODE (t) == MODIFY_EXPR
+	    && TREE_OPERAND (t, 0) == temp)
+	  return tree_expr_nonnegative_warnv_p (TREE_OPERAND (t, 1),
 						strict_overflow_p);
 
 	return false;
@@ -14296,8 +14291,7 @@ tree_invalid_nonnegative_warnv_p (tree t
       }
     case COMPOUND_EXPR:
     case MODIFY_EXPR:
-    case GIMPLE_MODIFY_STMT:
-      return tree_expr_nonnegative_warnv_p (GENERIC_TREE_OPERAND (t, 1),
+      return tree_expr_nonnegative_warnv_p (TREE_OPERAND (t, 1),
 					    strict_overflow_p);
     case BIND_EXPR:
       return tree_expr_nonnegative_warnv_p (expr_last (TREE_OPERAND (t, 1)),
@@ -14672,9 +14666,8 @@ tree_expr_nonzero_warnv_p (tree t, bool 
 
     case COMPOUND_EXPR:
     case MODIFY_EXPR:
-    case GIMPLE_MODIFY_STMT:
     case BIND_EXPR:
-      return tree_expr_nonzero_warnv_p (GENERIC_TREE_OPERAND (t, 1),
+      return tree_expr_nonzero_warnv_p (TREE_OPERAND (t, 1),
 					strict_overflow_p);
 
     case SAVE_EXPR:
Index: omp-low.c
===================================================================
--- omp-low.c	(revision 137784)
+++ omp-low.c	(working copy)
@@ -2265,15 +2265,26 @@ lower_rec_input_clauses (tree clauses, g
 
 	      if (c_kind != OMP_CLAUSE_FIRSTPRIVATE || !is_task_ctx (ctx))
 		{
+		  gimple stmt;
+		  tree tmp;
+
 		  ptr = DECL_VALUE_EXPR (new_var);
 		  gcc_assert (TREE_CODE (ptr) == INDIRECT_REF);
 		  ptr = TREE_OPERAND (ptr, 0);
 		  gcc_assert (DECL_P (ptr));
 		  x = TYPE_SIZE_UNIT (TREE_TYPE (new_var));
-		  x = build_call_expr (built_in_decls[BUILT_IN_ALLOCA], 1, x);
-		  x = fold_convert (TREE_TYPE (ptr), x);
-		  x = build_gimple_modify_stmt (ptr, x);
-		  gimplify_and_add (x, ilist);
+
+		  /* void *tmp = __builtin_alloca */
+		  stmt
+		    = gimple_build_call (built_in_decls[BUILT_IN_ALLOCA], 1, x);
+		  tmp = create_tmp_var_raw (ptr_type_node, NULL);
+		  gimple_add_tmp_var (tmp);
+		  gimple_call_set_lhs (stmt, tmp);
+
+		  gimple_seq_add_stmt (ilist, stmt);
+
+		  x = fold_convert (TREE_TYPE (ptr), tmp);
+		  gimplify_assign (ptr, x, ilist);
 		}
 	    }
 	  else if (is_reference (var))
@@ -2312,8 +2323,7 @@ lower_rec_input_clauses (tree clauses, g
 		  x = fold_convert (TREE_TYPE (new_var), x);
 		}
 
-	      x = build_gimple_modify_stmt (new_var, x);
-	      gimplify_and_add (x, ilist);
+	      gimplify_assign (new_var, x, ilist);
 
 	      new_var = build_fold_indirect_ref (new_var);
 	    }
@@ -2432,8 +2442,7 @@ lower_rec_input_clauses (tree clauses, g
 		{
 		  x = omp_reduction_init (c, TREE_TYPE (new_var));
 		  gcc_assert (TREE_CODE (TREE_TYPE (new_var)) != ARRAY_TYPE);
-		  x = build_gimple_modify_stmt (new_var, x);
-		  gimplify_and_add (x, ilist);
+		  gimplify_assign (new_var, x, ilist);
 		}
 	      break;
 
@@ -2637,8 +2646,7 @@ lower_reduction_clauses (tree clauses, g
 	{
 	  x = build2 (code, TREE_TYPE (ref), ref, new_var);
 	  ref = build_outer_var_ref (var, ctx);
-	  x = build_gimple_modify_stmt (ref, x);
-	  gimplify_and_add (x, &sub_seq);
+	  gimplify_assign (ref, x, &sub_seq);
 	}
     }
 
@@ -2674,8 +2682,7 @@ lower_copyprivate_clauses (tree clauses,
       ref = build_sender_ref (var, ctx);
       x = lookup_decl_in_outer_ctx (var, ctx);
       x = by_ref ? build_fold_addr_expr (x) : x;
-      x = build_gimple_modify_stmt (ref, x);
-      gimplify_and_add (x, slist);
+      gimplify_assign (ref, x, slist);
 
       ref = build_receiver_ref (var, by_ref, ctx);
       if (is_reference (var))
@@ -2764,8 +2771,7 @@ lower_send_clauses (tree clauses, gimple
 	{
 	  ref = build_sender_ref (val, ctx);
 	  x = by_ref ? build_fold_addr_expr (var) : var;
-	  x = build_gimple_modify_stmt (ref, x);
-	  gimplify_and_add (x, ilist);
+	  gimplify_assign (ref, x, ilist);
 	  if (is_task_ctx (ctx))
 	    DECL_ABSTRACT_ORIGIN (TREE_OPERAND (ref, 1)) = NULL;
 	}
@@ -2773,8 +2779,7 @@ lower_send_clauses (tree clauses, gimple
       if (do_out)
 	{
 	  ref = build_sender_ref (val, ctx);
-	  x = build_gimple_modify_stmt (var, ref);
-	  gimplify_and_add (x, olist);
+	  gimplify_assign (var, ref, olist);
 	}
     }
 }
@@ -2808,20 +2813,17 @@ lower_send_shared_vars (gimple_seq *ilis
 	{
 	  x = build_sender_ref (ovar, ctx);
 	  var = build_fold_addr_expr (var);
-	  x = build_gimple_modify_stmt (x, var);
-	  gimplify_and_add (x, ilist);
+	  gimplify_assign (x, var, ilist);
 	}
       else
 	{
 	  x = build_sender_ref (ovar, ctx);
-	  x = build_gimple_modify_stmt (x, var);
-	  gimplify_and_add (x, ilist);
+	  gimplify_assign (x, var, ilist);
 
 	  if (!TREE_READONLY (var))
 	    {
 	      x = build_sender_ref (ovar, ctx);
-	      x = build_gimple_modify_stmt (var, x);
-	      gimplify_and_add (x, olist);
+	      gimplify_assign (var, x, olist);
 	    }
 	}
     }
@@ -4966,7 +4968,7 @@ expand_omp_atomic_pipeline (basic_block 
 	}
       else
 	{
-	  x = build_gimple_modify_stmt (loaded_val, x);
+	  x = build2 (MODIFY_EXPR, TREE_TYPE (loaded_val), loaded_val, x);
 	  force_gimple_operand_gsi (&gsi2, x, true, NULL_TREE,
 				    true, GSI_SAME_STMT);
 	}
@@ -5566,8 +5568,7 @@ lower_omp_single_copy (gimple single_stm
 
   t = build_call_expr (built_in_decls[BUILT_IN_GOMP_SINGLE_COPY_START], 0);
   t = fold_convert (ptr_type, t);
-  t = build_gimple_modify_stmt (ctx->receiver_decl, t);
-  gimplify_and_add (t, pre_p);
+  gimplify_assign (ctx->receiver_decl, t, pre_p);
 
   t = build2 (EQ_EXPR, boolean_type_node, ctx->receiver_decl,
 	      build_int_cst (ptr_type, 0));
@@ -5824,7 +5825,7 @@ static void
 lower_omp_for_lastprivate (struct omp_for_data *fd, gimple_seq *body_p,
 			   gimple_seq *dlist, struct omp_context *ctx)
 {
-  tree clauses, cond, vinit, t;
+  tree clauses, cond, vinit;
   enum tree_code cond_code;
   gimple_seq stmts;
   
@@ -5859,8 +5860,7 @@ lower_omp_for_lastprivate (struct omp_fo
 
       /* Initialize the iterator variable, so that threads that don't execute
 	 any iterations don't execute the lastprivate clauses by accident.  */
-      t = build_gimple_modify_stmt (fd->loop.v, vinit);
-      gimplify_and_add (t, body_p);
+      gimplify_assign (fd->loop.v, vinit, body_p);
     }
 }
 
@@ -6128,7 +6128,7 @@ create_task_copyfn (gimple task_stmt, om
 	  sf = *(tree *) pointer_map_contains (tcctx.cb.decl_map, sf);
 	  src = build_fold_indirect_ref (sarg);
 	  src = build3 (COMPONENT_REF, TREE_TYPE (sf), src, sf, NULL);
-	  t = build_gimple_modify_stmt (*p, src);
+	  t = build2 (MODIFY_EXPR, TREE_TYPE (*p), *p, src);
 	  append_to_statement_list (t, &list);
 	}
 
@@ -6153,7 +6153,7 @@ create_task_copyfn (gimple task_stmt, om
 	src = build3 (COMPONENT_REF, TREE_TYPE (sf), src, sf, NULL);
 	dst = build_fold_indirect_ref (arg);
 	dst = build3 (COMPONENT_REF, TREE_TYPE (f), dst, f, NULL);
-	t = build_gimple_modify_stmt (dst, src);
+	t = build2 (MODIFY_EXPR, TREE_TYPE (dst), dst, src);
 	append_to_statement_list (t, &list);
 	break;
       case OMP_CLAUSE_FIRSTPRIVATE:
@@ -6207,7 +6207,7 @@ create_task_copyfn (gimple task_stmt, om
 	  src = decl;
 	dst = build_fold_indirect_ref (arg);
 	dst = build3 (COMPONENT_REF, TREE_TYPE (f), dst, f, NULL);
-	t = build_gimple_modify_stmt (dst, src);
+	t = build2 (MODIFY_EXPR, TREE_TYPE (dst), dst, src);
 	append_to_statement_list (t, &list);
 	break;
       default:
@@ -6250,7 +6250,8 @@ create_task_copyfn (gimple task_stmt, om
 	  df = *(tree *) pointer_map_contains (tcctx.cb.decl_map, df);
 	  ptr = build_fold_indirect_ref (arg);
 	  ptr = build3 (COMPONENT_REF, TREE_TYPE (df), ptr, df, NULL);
-	  t = build_gimple_modify_stmt (ptr, build_fold_addr_expr (dst));
+	  t = build2 (MODIFY_EXPR, TREE_TYPE (ptr), ptr,
+		      build_fold_addr_expr (dst));
 	  append_to_statement_list (t, &list);
 	}
 
Index: tree-ssa-dse.c
===================================================================
--- tree-ssa-dse.c	(revision 137784)
+++ tree-ssa-dse.c	(working copy)
@@ -273,7 +273,7 @@ get_kill_of_stmt_lhs (gimple stmt,
 }
 
 /* A helper of dse_optimize_stmt.
-   Given a GIMPLE_MODIFY_STMT in STMT, check that each VDEF has one
+   Given a GIMPLE_ASSIGN in STMT, check that each VDEF has one
    use, and that one use is another VDEF clobbering the first one.
 
    Return TRUE if the above conditions are met, otherwise FALSE.  */
@@ -404,7 +404,7 @@ dse_optimize_stmt (struct dom_walk_data 
   if (ZERO_SSA_OPERANDS (stmt, SSA_OP_VDEF))
     return;
 
-  /* We know we have virtual definitions.  If this is a GIMPLE_MODIFY_STMT
+  /* We know we have virtual definitions.  If this is a GIMPLE_ASSIGN
      that's not also a function call, then record it into our table.  */
   if (gimple_code (stmt) == GIMPLE_CALL && gimple_call_fndecl (stmt))
     return;
Index: tree-gimple.c
===================================================================
--- tree-gimple.c	(revision 137784)
+++ tree-gimple.c	(working copy)
@@ -64,7 +64,7 @@ is_gimple_formal_tmp_rhs (tree t)
 bool
 is_gimple_reg_rhs (tree t)
 {
-  /* If the RHS of the GIMPLE_MODIFY_STMT may throw or make a nonlocal goto
+  /* If the RHS of the MODIFY_EXPR may throw or make a nonlocal goto
      and the LHS is a user variable, then we need to introduce a formal
      temporary.  This way the optimizers can determine that the user
      variable is only modified if evaluation of the RHS does not throw.
@@ -284,7 +284,7 @@ is_gimple_stmt (tree t)
       return true;
 
     case CALL_EXPR:
-    case GIMPLE_MODIFY_STMT:
+    case MODIFY_EXPR:
     case PREDICT_EXPR:
       /* These are valid regardless of their type.  */
       return true;
@@ -483,10 +483,8 @@ is_gimple_call_addr (tree t)
 tree
 get_call_expr_in (tree t)
 {
-  /* FIXME tuples: delete the assertion below when conversion complete.  */
-  gcc_assert (TREE_CODE (t) != MODIFY_EXPR);
-  if (TREE_CODE (t) == GIMPLE_MODIFY_STMT)
-    t = GIMPLE_STMT_OPERAND (t, 1);
+  if (TREE_CODE (t) == MODIFY_EXPR)
+    t = TREE_OPERAND (t, 1);
   if (TREE_CODE (t) == WITH_SIZE_EXPR)
     t = TREE_OPERAND (t, 0);
   if (TREE_CODE (t) == CALL_EXPR)
@@ -532,7 +530,7 @@ recalculate_side_effects (tree t)
       switch (code)
 	{
 	case INIT_EXPR:
-	case GIMPLE_MODIFY_STMT:
+	case MODIFY_EXPR:
 	case VA_ARG_EXPR:
 	case PREDECREMENT_EXPR:
 	case PREINCREMENT_EXPR:
Index: cp/cp-tree.h
===================================================================
--- cp/cp-tree.h	(revision 137784)
+++ cp/cp-tree.h	(working copy)
@@ -534,7 +534,7 @@ enum cp_tree_node_structure_enum {
 
 /* The resulting tree type.  */
 union lang_tree_node GTY((desc ("cp_tree_node_structure (&%h)"),
-       chain_next ("(union lang_tree_node *)GENERIC_NEXT (&%h.generic)")))
+       chain_next ("(union lang_tree_node *)TREE_CHAIN (&%h.generic)")))
 {
   union tree_node GTY ((tag ("TS_CP_GENERIC"),
 			desc ("tree_node_structure (&%h)"))) generic;
Index: cp/cp-gimplify.c
===================================================================
--- cp/cp-gimplify.c	(revision 137784)
+++ cp/cp-gimplify.c	(working copy)
@@ -870,13 +870,13 @@ cxx_omp_clause_apply_fn (tree fn, tree a
       end1 = build2 (POINTER_PLUS_EXPR, TREE_TYPE (start1), start1, end1);
 
       p1 = create_tmp_var (TREE_TYPE (start1), NULL);
-      t = build2 (GIMPLE_MODIFY_STMT, void_type_node, p1, start1);
+      t = build2 (MODIFY_EXPR, TREE_TYPE (p1), p1, start1);
       append_to_statement_list (t, &ret);
 
       if (arg2)
 	{
 	  p2 = create_tmp_var (TREE_TYPE (start2), NULL);
-	  t = build2 (GIMPLE_MODIFY_STMT, void_type_node, p2, start2);
+	  t = build2 (MODIFY_EXPR, TREE_TYPE (p2), p2, start2);
 	  append_to_statement_list (t, &ret);
 	}
 
@@ -899,14 +899,14 @@ cxx_omp_clause_apply_fn (tree fn, tree a
 
       t = TYPE_SIZE_UNIT (inner_type);
       t = build2 (POINTER_PLUS_EXPR, TREE_TYPE (p1), p1, t);
-      t = build2 (GIMPLE_MODIFY_STMT, void_type_node, p1, t);
+      t = build2 (MODIFY_EXPR, TREE_TYPE (p1), p1, t);
       append_to_statement_list (t, &ret);
 
       if (arg2)
 	{
 	  t = TYPE_SIZE_UNIT (inner_type);
 	  t = build2 (POINTER_PLUS_EXPR, TREE_TYPE (p2), p2, t);
-	  t = build2 (GIMPLE_MODIFY_STMT, void_type_node, p2, t);
+	  t = build2 (MODIFY_EXPR, TREE_TYPE (p2), p2, t);
 	  append_to_statement_list (t, &ret);
 	}
 
@@ -960,7 +960,7 @@ cxx_omp_clause_copy_ctor (tree clause, t
   if (info)
     ret = cxx_omp_clause_apply_fn (TREE_VEC_ELT (info, 0), dst, src);
   if (ret == NULL)
-    ret = build2 (GIMPLE_MODIFY_STMT, void_type_node, dst, src);
+    ret = build2 (MODIFY_EXPR, TREE_TYPE (dst), dst, src);
 
   return ret;
 }
@@ -976,7 +976,7 @@ cxx_omp_clause_assign_op (tree clause, t
   if (info)
     ret = cxx_omp_clause_apply_fn (TREE_VEC_ELT (info, 2), dst, src);
   if (ret == NULL)
-    ret = build2 (GIMPLE_MODIFY_STMT, void_type_node, dst, src);
+    ret = build2 (MODIFY_EXPR, TREE_TYPE (dst), dst, src);
 
   return ret;
 }
Index: tree-ssa-math-opts.c
===================================================================
--- tree-ssa-math-opts.c	(revision 137784)
+++ tree-ssa-math-opts.c	(working copy)
@@ -110,7 +110,7 @@ struct occurrence {
      inserted in BB.  */
   tree recip_def;
 
-  /* If non-NULL, the GIMPLE_MODIFY_STMT for a reciprocal computation that
+  /* If non-NULL, the GIMPLE_ASSIGN for a reciprocal computation that
      was inserted in BB.  */
   gimple recip_def_stmt;
 
Index: tree-nrv.c
===================================================================
--- tree-nrv.c	(revision 137784)
+++ tree-nrv.c	(working copy)
@@ -280,7 +280,7 @@ dest_safe_for_nrv_p (tree dest)
   return true;
 }
 
-/* Walk through the function looking for GIMPLE_MODIFY_STMTs with calls that
+/* Walk through the function looking for GIMPLE_ASSIGNs with calls that
    return in memory on the RHS.  For each of these, determine whether it is
    safe to pass the address of the LHS as the return slot, and mark the
    call appropriately if so.
Index: gimple-low.c
===================================================================
--- gimple-low.c	(revision 137784)
+++ gimple-low.c	(working copy)
@@ -537,9 +537,9 @@ block_may_fallthru (const_tree block)
       return (block_may_fallthru (TREE_OPERAND (stmt, 0))
 	      && block_may_fallthru (TREE_OPERAND (stmt, 1)));
 
-    case GIMPLE_MODIFY_STMT:
-      if (TREE_CODE (GIMPLE_STMT_OPERAND (stmt, 1)) == CALL_EXPR)
-	stmt = GIMPLE_STMT_OPERAND (stmt, 1);
+    case MODIFY_EXPR:
+      if (TREE_CODE (TREE_OPERAND (stmt, 1)) == CALL_EXPR)
+	stmt = TREE_OPERAND (stmt, 1);
       else
 	return true;
       /* FALLTHRU */
Index: dwarf2out.c
===================================================================
--- dwarf2out.c	(revision 137784)
+++ dwarf2out.c	(working copy)
@@ -9610,9 +9610,8 @@ loc_descriptor_from_tree_1 (tree loc, in
     CASE_CONVERT:
     case VIEW_CONVERT_EXPR:
     case SAVE_EXPR:
-    case GIMPLE_MODIFY_STMT:
-      return loc_descriptor_from_tree_1 (GENERIC_TREE_OPERAND (loc, 0),
-					 want_address);
+    case MODIFY_EXPR:
+      return loc_descriptor_from_tree_1 (TREE_OPERAND (loc, 0), want_address);
 
     case COMPONENT_REF:
     case BIT_FIELD_REF:
@@ -10416,7 +10415,7 @@ static tree
 reference_to_unused (tree * tp, int * walk_subtrees,
 		     void * data ATTRIBUTE_UNUSED)
 {
-  if (! EXPR_P (*tp) && ! GIMPLE_STMT_P (*tp) && ! CONSTANT_CLASS_P (*tp))
+  if (! EXPR_P (*tp) && ! CONSTANT_CLASS_P (*tp))
     *walk_subtrees = 0;
 
   if (DECL_P (*tp) && ! TREE_PUBLIC (*tp) && ! TREE_USED (*tp)
Index: expr.c
===================================================================
--- expr.c	(revision 137784)
+++ expr.c	(working copy)
@@ -6537,9 +6537,6 @@ safe_from_p (const_rtx x, tree exp, int 
     case tcc_type:
       /* Should never get a type here.  */
       gcc_unreachable ();
-
-    case tcc_gimple_stmt:
-      gcc_unreachable ();
     }
 
   /* If we have an rtl, find any enclosed object.  Then see if we conflict
@@ -7046,7 +7043,7 @@ expand_expr_real (tree exp, rtx target, 
 
   /* Handle ERROR_MARK before anybody tries to access its type.  */
   if (TREE_CODE (exp) == ERROR_MARK
-      || (!GIMPLE_TUPLE_P (exp) && TREE_CODE (TREE_TYPE (exp)) == ERROR_MARK))
+      || (TREE_CODE (TREE_TYPE (exp)) == ERROR_MARK))
     {
       ret = CONST0_RTX (tmode);
       return ret ? ret : const0_rtx;
@@ -7129,18 +7126,9 @@ expand_expr_real_1 (tree exp, rtx target
 								  type)	  \
 				 : (expr))
 
-  if (GIMPLE_STMT_P (exp))
-    {
-      type = void_type_node;
-      mode = VOIDmode;
-      unsignedp = 0;
-    }
-  else
-    {
-      type = TREE_TYPE (exp);
-      mode = TYPE_MODE (type);
-      unsignedp = TYPE_UNSIGNED (type);
-    }
+  type = TREE_TYPE (exp);
+  mode = TYPE_MODE (type);
+  unsignedp = TYPE_UNSIGNED (type);
 
   ignore = (target == const0_rtx
 	    || ((code == NOP_EXPR || code == CONVERT_EXPR 
@@ -9088,16 +9076,6 @@ expand_expr_real_1 (tree exp, rtx target
 	tree lhs = TREE_OPERAND (exp, 0);
 	tree rhs = TREE_OPERAND (exp, 1);
 	gcc_assert (ignore);
-	expand_assignment (lhs, rhs, false);
-	return const0_rtx;
-      }
-
-    case GIMPLE_MODIFY_STMT:
-      {
-	tree lhs = GIMPLE_STMT_OPERAND (exp, 0);
-	tree rhs = GIMPLE_STMT_OPERAND (exp, 1);
-
-	gcc_assert (ignore);
 
 	/* Check for |= or &= of a bitfield of size one into another bitfield
 	   of size 1.  In this case, (unless we need the result of the
@@ -9127,7 +9105,7 @@ expand_expr_real_1 (tree exp, rtx target
 	    return const0_rtx;
 	  }
 
-	expand_assignment (lhs, rhs, MOVE_NONTEMPORAL (exp));
+	expand_assignment (lhs, rhs, false);
 	return const0_rtx;
       }
 
Index: tree-parloops.c
===================================================================
--- tree-parloops.c	(revision 137784)
+++ tree-parloops.c	(working copy)
@@ -636,7 +636,7 @@ eliminate_local_variables_1 (tree *tp, i
       return NULL_TREE;
     }
 
-  if (!EXPR_P (t) && !GIMPLE_STMT_P (t))
+  if (!EXPR_P (t))
     *walk_subtrees = 0;
 
   return NULL_TREE;
Index: matrix-reorg.c
===================================================================
--- matrix-reorg.c	(revision 137784)
+++ matrix-reorg.c	(working copy)
@@ -429,7 +429,7 @@ may_flatten_matrices_1 (tree stmt)
   switch (TREE_CODE (stmt))
     {
     case GIMPLE_MODIFY_STMT:
-      t = GIMPLE_STMT_OPERAND (stmt, 1);
+      t = TREE_OPERAND (stmt, 1);
       while (CONVERT_EXPR_P (t))
 	{
 	  if (TREE_TYPE (t) && POINTER_TYPE_P (TREE_TYPE (t)))
@@ -774,7 +774,7 @@ analyze_matrix_allocation_site (struct m
 {
   if (TREE_CODE (stmt) == GIMPLE_MODIFY_STMT)
     {
-      tree rhs = GIMPLE_STMT_OPERAND (stmt, 1);
+      tree rhs = TREE_OPERAND (stmt, 1);
 
       rhs = get_inner_of_cast_expr (rhs);
       if (TREE_CODE (rhs) == SSA_NAME)
@@ -909,7 +909,7 @@ analyze_transpose (void **slot, void *da
   for (i = 0; VEC_iterate (access_site_info_p, mi->access_l, i, acc_info);
        i++)
     {
-      if (TREE_CODE (GIMPLE_STMT_OPERAND (acc_info->stmt, 1)) == POINTER_PLUS_EXPR
+      if (TREE_CODE (TREE_OPERAND (acc_info->stmt, 1)) == POINTER_PLUS_EXPR
 	  && acc_info->level < min_escape_l)
 	{
 	  loop = loop_containing_stmt (acc_info->stmt);
@@ -951,7 +951,7 @@ get_index_from_offset (tree offset, tree
 
   if (TREE_CODE (def_stmt) == PHI_NODE)
     return NULL;
-  expr = get_inner_of_cast_expr (GIMPLE_STMT_OPERAND (def_stmt, 1));
+  expr = get_inner_of_cast_expr (TREE_OPERAND (def_stmt, 1));
   if (TREE_CODE (expr) == SSA_NAME)
     return get_index_from_offset (offset, SSA_NAME_DEF_STMT (expr));
   else if (TREE_CODE (expr) == MULT_EXPR)
@@ -979,9 +979,9 @@ update_type_size (struct matrix_info *mi
 
   /* Update type according to the type of the INDIRECT_REF expr.   */
   if (TREE_CODE (stmt) == GIMPLE_MODIFY_STMT
-      && TREE_CODE (GIMPLE_STMT_OPERAND (stmt, 0)) == INDIRECT_REF)
+      && TREE_CODE (TREE_OPERAND (stmt, 0)) == INDIRECT_REF)
     {
-      lhs = GIMPLE_STMT_OPERAND (stmt, 0);
+      lhs = TREE_OPERAND (stmt, 0);
       gcc_assert (POINTER_TYPE_P
 		  (TREE_TYPE (SSA_NAME_VAR (TREE_OPERAND (lhs, 0)))));
       type_size =
@@ -1138,8 +1138,8 @@ analyze_accesses_for_modify_stmt (struct
 				  bool record_accesses)
 {
 
-  tree lhs = GIMPLE_STMT_OPERAND (use_stmt, 0);
-  tree rhs = GIMPLE_STMT_OPERAND (use_stmt, 1);
+  tree lhs = TREE_OPERAND (use_stmt, 0);
+  tree rhs = TREE_OPERAND (use_stmt, 1);
   struct ssa_acc_in_tree lhs_acc, rhs_acc;
 
   memset (&lhs_acc, 0, sizeof (lhs_acc));
@@ -1375,7 +1375,7 @@ check_var_notmodified_p (tree * tp, int 
 	stmt = bsi_stmt (bsi);
 	if (TREE_CODE (stmt) != GIMPLE_MODIFY_STMT)
 	  continue;
-	if (GIMPLE_STMT_OPERAND (stmt, 0) == t)
+	if (TREE_OPERAND (stmt, 0) == t)
 	  return stmt;
       }
   }
@@ -1424,7 +1424,7 @@ can_calculate_expr_before_stmt (tree exp
 	return fold_build2 (TREE_CODE (expr), TREE_TYPE (expr), op1, op2);
       return NULL_TREE;
     case GIMPLE_MODIFY_STMT:
-      return can_calculate_expr_before_stmt (GIMPLE_STMT_OPERAND (expr, 1),
+      return can_calculate_expr_before_stmt (TREE_OPERAND (expr, 1),
 					     visited);
     case PHI_NODE:
       {
@@ -1587,9 +1587,9 @@ find_sites_in_func (bool record)
       {
 	stmt = bsi_stmt (bsi);
 	if (TREE_CODE (stmt) == GIMPLE_MODIFY_STMT
-	    && TREE_CODE (GIMPLE_STMT_OPERAND (stmt, 0)) == VAR_DECL)
+	    && TREE_CODE (TREE_OPERAND (stmt, 0)) == VAR_DECL)
 	  {
-	    tmpmi.decl = GIMPLE_STMT_OPERAND (stmt, 0);
+	    tmpmi.decl = TREE_OPERAND (stmt, 0);
 	    if ((mi = (struct matrix_info *) htab_find (matrices_to_reorg,
 							&tmpmi)))
 	      {
@@ -1598,16 +1598,16 @@ find_sites_in_func (bool record)
 	      }
 	  }
 	if (TREE_CODE (stmt) == GIMPLE_MODIFY_STMT
-	    && TREE_CODE (GIMPLE_STMT_OPERAND (stmt, 0)) == SSA_NAME
-	    && TREE_CODE (GIMPLE_STMT_OPERAND (stmt, 1)) == VAR_DECL)
+	    && TREE_CODE (TREE_OPERAND (stmt, 0)) == SSA_NAME
+	    && TREE_CODE (TREE_OPERAND (stmt, 1)) == VAR_DECL)
 	  {
-	    tmpmi.decl = GIMPLE_STMT_OPERAND (stmt, 1);
+	    tmpmi.decl = TREE_OPERAND (stmt, 1);
 	    if ((mi = (struct matrix_info *) htab_find (matrices_to_reorg,
 							&tmpmi)))
 	      {
 		sbitmap_zero (visited_stmts_1);
 		analyze_matrix_accesses (mi,
-					 GIMPLE_STMT_OPERAND (stmt, 0), 0,
+					 TREE_OPERAND (stmt, 0), 0,
 					 false, visited_stmts_1, record);
 	      }
 	  }
@@ -1641,8 +1641,8 @@ record_all_accesses_in_func (void)
       if (!ssa_var
 	  || TREE_CODE (SSA_NAME_DEF_STMT (ssa_var)) != GIMPLE_MODIFY_STMT)
 	continue;
-      rhs = GIMPLE_STMT_OPERAND (SSA_NAME_DEF_STMT (ssa_var), 1);
-      lhs = GIMPLE_STMT_OPERAND (SSA_NAME_DEF_STMT (ssa_var), 0);
+      rhs = TREE_OPERAND (SSA_NAME_DEF_STMT (ssa_var), 1);
+      lhs = TREE_OPERAND (SSA_NAME_DEF_STMT (ssa_var), 0);
       if (TREE_CODE (rhs) != VAR_DECL && TREE_CODE (lhs) != VAR_DECL)
 	continue;
 
@@ -1750,7 +1750,7 @@ transform_access_sites (void **slot, voi
 		mark_sym_for_renaming (SSA_NAME_VAR (def));
 	      bsi = bsi_for_stmt (stmt);
 	      gcc_assert (TREE_CODE (acc_info->stmt) == GIMPLE_MODIFY_STMT);
-	      if (TREE_CODE (GIMPLE_STMT_OPERAND (acc_info->stmt, 0)) ==
+	      if (TREE_CODE (TREE_OPERAND (acc_info->stmt, 0)) ==
 		  SSA_NAME && acc_info->level < min_escape_l - 1)
 		{
 		  imm_use_iterator imm_iter;
@@ -1758,7 +1758,7 @@ transform_access_sites (void **slot, voi
 		  tree use_stmt;
 
 		  FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter,
-					 GIMPLE_STMT_OPERAND (acc_info->stmt,
+					 TREE_OPERAND (acc_info->stmt,
 							      0))
 		    FOR_EACH_IMM_USE_ON_STMT (use_p, imm_iter)
 		  {
@@ -1767,22 +1767,22 @@ transform_access_sites (void **slot, voi
 		    /* Emit convert statement to convert to type of use.  */
 		    conv =
 		      fold_build1 (CONVERT_EXPR,
-				   TREE_TYPE (GIMPLE_STMT_OPERAND
+				   TREE_TYPE (TREE_OPERAND
 					      (acc_info->stmt, 0)),
-				   TREE_OPERAND (GIMPLE_STMT_OPERAND
+				   TREE_OPERAND (TREE_OPERAND
 						 (acc_info->stmt, 1), 0));
 		    tmp =
 		      create_tmp_var (TREE_TYPE
-				      (GIMPLE_STMT_OPERAND
+				      (TREE_OPERAND
 				       (acc_info->stmt, 0)), "new");
 		    add_referenced_var (tmp);
 		    stmts =
 		      fold_build2 (GIMPLE_MODIFY_STMT,
-				   TREE_TYPE (GIMPLE_STMT_OPERAND
+				   TREE_TYPE (TREE_OPERAND
 					      (acc_info->stmt, 0)), tmp,
 				   conv);
 		    tmp = make_ssa_name (tmp, stmts);
-		    GIMPLE_STMT_OPERAND (stmts, 0) = tmp;
+		    TREE_OPERAND (stmts, 0) = tmp;
 		    bsi = bsi_for_stmt (acc_info->stmt);
 		    bsi_insert_after (&bsi, stmts, BSI_SAME_STMT);
 		    SET_USE (use_p, tmp);
@@ -1794,7 +1794,7 @@ transform_access_sites (void **slot, voi
 	  free (acc_info);
 	  continue;
 	}
-      orig = GIMPLE_STMT_OPERAND (acc_info->stmt, 1);
+      orig = TREE_OPERAND (acc_info->stmt, 1);
       type = TREE_TYPE (orig);
       if (TREE_CODE (orig) == INDIRECT_REF
 	  && acc_info->level < min_escape_l - 1)
@@ -1803,8 +1803,8 @@ transform_access_sites (void **slot, voi
 	     from "pointer to type" to "type".  */
 	  orig =
 	    build1 (NOP_EXPR, TREE_TYPE (orig),
-		    GIMPLE_STMT_OPERAND (orig, 0));
-	  GIMPLE_STMT_OPERAND (acc_info->stmt, 1) = orig;
+		    TREE_OPERAND (orig, 0));
+	  TREE_OPERAND (acc_info->stmt, 1) = orig;
 	}
       else if (TREE_CODE (orig) == POINTER_PLUS_EXPR
 	       && acc_info->level < (min_escape_l))
@@ -2094,7 +2094,7 @@ transform_allocation_sites (void **slot,
 					   true, BSI_SAME_STMT);
       /* GLOBAL_HOLDING_THE_SIZE = DIM_SIZE.  */
       tmp = fold_build2 (GIMPLE_MODIFY_STMT, type, dim_var, dim_size);
-      GIMPLE_STMT_OPERAND (tmp, 0) = dim_var;
+      TREE_OPERAND (tmp, 0) = dim_var;
       mark_symbols_for_renaming (tmp);
       bsi_insert_before (&bsi, tmp, BSI_SAME_STMT);
 
@@ -2103,7 +2103,7 @@ transform_allocation_sites (void **slot,
   update_ssa (TODO_update_ssa);
   /* Replace the malloc size argument in the malloc of level 0 to be
      the size of all the dimensions.  */
-  malloc_stmt = GIMPLE_STMT_OPERAND (call_stmt_0, 1);
+  malloc_stmt = TREE_OPERAND (call_stmt_0, 1);
   c_node = cgraph_node (mi->allocation_function_decl);
   old_size_0 = CALL_EXPR_ARG (malloc_stmt, 0);
   tmp = force_gimple_operand_bsi (&bsi, mi->dimension_size[0], true,
@@ -2127,7 +2127,7 @@ transform_allocation_sites (void **slot,
       tree call;
 
       tree call_stmt = mi->malloc_for_level[i];
-      call = GIMPLE_STMT_OPERAND (call_stmt, 1);
+      call = TREE_OPERAND (call_stmt, 1);
       gcc_assert (TREE_CODE (call) == CALL_EXPR);
       e = cgraph_edge (c_node, call_stmt);
       gcc_assert (e);
@@ -2137,7 +2137,7 @@ transform_allocation_sites (void **slot,
       bsi_remove (&bsi, true);
       /* remove the type cast stmt.  */
       FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter,
-			     GIMPLE_STMT_OPERAND (call_stmt, 0))
+			     TREE_OPERAND (call_stmt, 0))
       {
 	use_stmt1 = use_stmt;
 	bsi = bsi_for_stmt (use_stmt);
@@ -2145,7 +2145,7 @@ transform_allocation_sites (void **slot,
       }
       /* Remove the assignment of the allocated area.  */
       FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter,
-			     GIMPLE_STMT_OPERAND (use_stmt1, 0))
+			     TREE_OPERAND (use_stmt1, 0))
       {
 	bsi = bsi_for_stmt (use_stmt);
 	bsi_remove (&bsi, true);
Index: c-decl.c
===================================================================
--- c-decl.c	(revision 137784)
+++ c-decl.c	(working copy)
@@ -249,7 +249,7 @@ extern char C_SIZEOF_STRUCT_LANG_IDENTIF
 
 union lang_tree_node
   GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"),
-       chain_next ("TREE_CODE (&%h.generic) == INTEGER_TYPE ? (union lang_tree_node *) TYPE_NEXT_VARIANT (&%h.generic) : ((union lang_tree_node *) GENERIC_NEXT (&%h.generic))")))
+       chain_next ("TREE_CODE (&%h.generic) == INTEGER_TYPE ? (union lang_tree_node *) TYPE_NEXT_VARIANT (&%h.generic) : ((union lang_tree_node *) TREE_CHAIN (&%h.generic))")))
 {
   union tree_node GTY ((tag ("0"),
 			desc ("tree_node_structure (&%h)")))
Index: tree-eh.c
===================================================================
--- tree-eh.c	(revision 137784)
+++ tree-eh.c	(working copy)
@@ -2409,12 +2409,12 @@ tree_could_throw_p (tree t)
 {
   if (!flag_exceptions)
     return false;
-  if (TREE_CODE (t) == GIMPLE_MODIFY_STMT)
+  if (TREE_CODE (t) == MODIFY_EXPR)
     {
       if (flag_non_call_exceptions
-	  && tree_could_trap_p (GIMPLE_STMT_OPERAND (t, 0)))
+	  && tree_could_trap_p (TREE_OPERAND (t, 0)))
 	return true;
-      t = GIMPLE_STMT_OPERAND (t, 1);
+      t = TREE_OPERAND (t, 1);
     }
 
   if (TREE_CODE (t) == WITH_SIZE_EXPR)
Index: fortran/trans-expr.c
===================================================================
--- fortran/trans-expr.c	(revision 137784)
+++ fortran/trans-expr.c	(working copy)
@@ -115,7 +115,7 @@ gfc_make_safe_expr (gfc_se * se)
 
   /* We need a temporary for this result.  */
   var = gfc_create_var (TREE_TYPE (se->expr), NULL);
-  gfc_add_modify_expr (&se->pre, var, se->expr);
+  gfc_add_modify (&se->pre, var, se->expr);
   se->expr = var;
 }
 
@@ -257,7 +257,7 @@ gfc_conv_string_length (gfc_charlen * cl
   gfc_add_block_to_block (pblock, &se.pre);
 
   if (cl->backend_decl)
-    gfc_add_modify_expr (pblock, cl->backend_decl, se.expr);
+    gfc_add_modify (pblock, cl->backend_decl, se.expr);
   else
     cl->backend_decl = gfc_evaluate_now (se.expr, pblock);
 }
@@ -993,7 +993,7 @@ gfc_conv_string_tmp (gfc_se * se, tree t
 			     fold_build2 (MULT_EXPR, TREE_TYPE (len), len,
 					  fold_convert (TREE_TYPE (len),
 							TYPE_SIZE (type))));
-      gfc_add_modify_expr (&se->pre, var, tmp);
+      gfc_add_modify (&se->pre, var, tmp);
 
       /* Free the temporary afterwards.  */
       tmp = gfc_call_free (convert (pvoid_type_node, var));
@@ -1509,7 +1509,7 @@ gfc_get_interface_mapping_array (stmtblo
   type = gfc_get_nodesc_array_type (type, sym->as, packed);
 
   var = gfc_create_var (type, "ifm");
-  gfc_add_modify_expr (block, var, fold_convert (type, data));
+  gfc_add_modify (block, var, fold_convert (type, data));
 
   return var;
 }
@@ -2165,7 +2165,7 @@ gfc_conv_subref_array_arg (gfc_se * parm
 
   tmp_index = fold_build2 (MINUS_EXPR, gfc_array_index_type,
   			   tmp_index, rse.loop->from[0]);
-  gfc_add_modify_expr (&rse.loop->code[0], offset, tmp_index);
+  gfc_add_modify (&rse.loop->code[0], offset, tmp_index);
 
   tmp_index = fold_build2 (PLUS_EXPR, gfc_array_index_type,
 			   rse.loop->loopvar[0], offset);
@@ -2892,9 +2892,9 @@ fill_with_spaces (tree start, tree type,
   /* Initialize variables.  */
   gfc_init_block (&block);
   i = gfc_create_var (sizetype, "i");
-  gfc_add_modify_expr (&block, i, fold_convert (sizetype, size));
+  gfc_add_modify (&block, i, fold_convert (sizetype, size));
   el = gfc_create_var (build_pointer_type (type), "el");
-  gfc_add_modify_expr (&block, el, fold_convert (TREE_TYPE (el), start));
+  gfc_add_modify (&block, el, fold_convert (TREE_TYPE (el), start));
   exit_label = gfc_build_label_decl (NULL_TREE);
   TREE_USED (exit_label) = 1;
 
@@ -2910,14 +2910,14 @@ fill_with_spaces (tree start, tree type,
   gfc_add_expr_to_block (&loop, tmp);
 
   /* Assignment.  */
-  gfc_add_modify_expr (&loop, fold_build1 (INDIRECT_REF, type, el),
+  gfc_add_modify (&loop, fold_build1 (INDIRECT_REF, type, el),
 		       build_int_cst (type,
 				      lang_hooks.to_target_charset (' ')));
 
   /* Increment loop variables.  */
-  gfc_add_modify_expr (&loop, i, fold_build2 (MINUS_EXPR, sizetype, i,
+  gfc_add_modify (&loop, i, fold_build2 (MINUS_EXPR, sizetype, i,
 					      TYPE_SIZE_UNIT (type)));
-  gfc_add_modify_expr (&loop, el, fold_build2 (POINTER_PLUS_EXPR,
+  gfc_add_modify (&loop, el, fold_build2 (POINTER_PLUS_EXPR,
 					       TREE_TYPE (el), el,
 					       TYPE_SIZE_UNIT (type)));
 
@@ -2986,7 +2986,7 @@ gfc_trans_string_copy (stmtblock_t * blo
   if (dsc != NULL_TREE && ssc != NULL_TREE
       && TREE_TYPE (dsc) == TREE_TYPE (ssc))
     {
-      gfc_add_modify_expr (block, dsc, ssc);
+      gfc_add_modify (block, dsc, ssc);
       return;
     }
 
@@ -3132,7 +3132,7 @@ gfc_conv_statement_function (gfc_se * se
           gfc_conv_expr (&lse, args->expr);
 
           gfc_add_block_to_block (&se->pre, &lse.pre);
-          gfc_add_modify_expr (&se->pre, temp_vars[n], lse.expr);
+          gfc_add_modify (&se->pre, temp_vars[n], lse.expr);
           gfc_add_block_to_block (&se->pre, &lse.post);
         }
 
@@ -3417,7 +3417,7 @@ gfc_trans_subcomponent_assign (tree dest
 	  se.want_pointer = 1;
 	  gfc_conv_expr (&se, expr);
 	  gfc_add_block_to_block (&block, &se.pre);
-	  gfc_add_modify_expr (&block, dest,
+	  gfc_add_modify (&block, dest,
 			       fold_convert (TREE_TYPE (dest), se.expr));
 	  gfc_add_block_to_block (&block, &se.post);
 	}
@@ -3438,7 +3438,7 @@ gfc_trans_subcomponent_assign (tree dest
 	  gfc_add_block_to_block (&block, &se.pre);
 
 	  tmp = fold_convert (TREE_TYPE (dest), se.expr);
-	  gfc_add_modify_expr (&block, dest, tmp);
+	  gfc_add_modify (&block, dest, tmp);
 
 	  if (cm->ts.type == BT_DERIVED && cm->ts.derived->attr.alloc_comp)
 	    tmp = gfc_copy_alloc_comp (cm->ts.derived, se.expr, dest,
@@ -3456,7 +3456,7 @@ gfc_trans_subcomponent_assign (tree dest
 	  /* Shift the lbound and ubound of temporaries to being unity, rather
 	     than zero, based.  Calculate the offset for all cases.  */
 	  offset = gfc_conv_descriptor_offset (dest);
-	  gfc_add_modify_expr (&block, offset, gfc_index_zero_node);
+	  gfc_add_modify (&block, offset, gfc_index_zero_node);
 	  tmp2 =gfc_create_var (gfc_array_index_type, NULL);
 	  for (n = 0; n < expr->rank; n++)
 	    {
@@ -3467,21 +3467,21 @@ gfc_trans_subcomponent_assign (tree dest
 		  tmp = gfc_conv_descriptor_ubound (dest, gfc_rank_cst[n]);
 		  span = fold_build2 (MINUS_EXPR, gfc_array_index_type, tmp,
 			    gfc_conv_descriptor_lbound (dest, gfc_rank_cst[n]));
-		  gfc_add_modify_expr (&block, tmp,
+		  gfc_add_modify (&block, tmp,
 				       fold_build2 (PLUS_EXPR,
 						    gfc_array_index_type,
 						    span, gfc_index_one_node));
 		  tmp = gfc_conv_descriptor_lbound (dest, gfc_rank_cst[n]);
-		  gfc_add_modify_expr (&block, tmp, gfc_index_one_node);
+		  gfc_add_modify (&block, tmp, gfc_index_one_node);
 		}
 	      tmp = fold_build2 (MULT_EXPR, gfc_array_index_type,
 				 gfc_conv_descriptor_lbound (dest,
 							     gfc_rank_cst[n]),
 				 gfc_conv_descriptor_stride (dest,
 							     gfc_rank_cst[n]));
-	      gfc_add_modify_expr (&block, tmp2, tmp);
+	      gfc_add_modify (&block, tmp2, tmp);
 	      tmp = fold_build2 (MINUS_EXPR, gfc_array_index_type, offset, tmp2);
-	      gfc_add_modify_expr (&block, offset, tmp);
+	      gfc_add_modify (&block, offset, tmp);
 	    }
 	}
       else
@@ -3496,7 +3496,7 @@ gfc_trans_subcomponent_assign (tree dest
 	{
 	  gfc_init_se (&se, NULL);
 	  gfc_conv_expr (&se, expr);
-	  gfc_add_modify_expr (&block, dest,
+	  gfc_add_modify (&block, dest,
 			       fold_convert (TREE_TYPE (dest), se.expr));
 	}
       else
@@ -3742,7 +3742,7 @@ gfc_conv_expr_val (gfc_se * se, gfc_expr
   if (se->post.head)
     {
       val = gfc_create_var (TREE_TYPE (se->expr), NULL);
-      gfc_add_modify_expr (&se->pre, val, se->expr);
+      gfc_add_modify (&se->pre, val, se->expr);
       se->expr = val;
       gfc_add_block_to_block (&se->pre, &se->post);
     }
@@ -3788,7 +3788,7 @@ gfc_conv_expr_reference (gfc_se * se, gf
       if (se->post.head)
 	{
 	  var = gfc_create_var (TREE_TYPE (se->expr), NULL);
-	  gfc_add_modify_expr (&se->pre, var, se->expr);
+	  gfc_add_modify (&se->pre, var, se->expr);
 	  gfc_add_block_to_block (&se->pre, &se->post);
 	  se->expr = var;
 	}
@@ -3802,7 +3802,7 @@ gfc_conv_expr_reference (gfc_se * se, gf
       se->want_pointer = 1;
       gfc_conv_expr (se, expr);
       var = gfc_create_var (TREE_TYPE (se->expr), NULL);
-      gfc_add_modify_expr (&se->pre, var, se->expr);
+      gfc_add_modify (&se->pre, var, se->expr);
       se->expr = var;
       return;
     }
@@ -3823,7 +3823,7 @@ gfc_conv_expr_reference (gfc_se * se, gf
   else
     {
       var = gfc_create_var (TREE_TYPE (se->expr), NULL);
-      gfc_add_modify_expr (&se->pre, var, se->expr);
+      gfc_add_modify (&se->pre, var, se->expr);
     }
   gfc_add_block_to_block (&se->pre, &se->post);
 
@@ -3876,7 +3876,7 @@ gfc_trans_pointer_assignment (gfc_expr *
 
       gfc_add_block_to_block (&block, &lse.pre);
       gfc_add_block_to_block (&block, &rse.pre);
-      gfc_add_modify_expr (&block, lse.expr,
+      gfc_add_modify (&block, lse.expr,
 			   fold_convert (TREE_TYPE (lse.expr), rse.expr));
       gfc_add_block_to_block (&block, &rse.post);
       gfc_add_block_to_block (&block, &lse.post);
@@ -3909,7 +3909,7 @@ gfc_trans_pointer_assignment (gfc_expr *
 	      tmp = fold_convert (gfc_array_index_type, size_in_bytes (tmp));
 	      if (!INTEGER_CST_P (tmp))
 	        gfc_add_block_to_block (&lse.post, &rse.pre);
-	      gfc_add_modify_expr (&lse.post, GFC_DECL_SPAN(decl), tmp);
+	      gfc_add_modify (&lse.post, GFC_DECL_SPAN(decl), tmp);
 	    }
 
 	  break;
@@ -3923,7 +3923,7 @@ gfc_trans_pointer_assignment (gfc_expr *
 	  lse.expr = tmp;
 	  lse.direct_byref = 1;
 	  gfc_conv_expr_descriptor (&lse, expr2, rss);
-	  gfc_add_modify_expr (&lse.pre, desc, tmp);
+	  gfc_add_modify (&lse.pre, desc, tmp);
 	  break;
         }
       gfc_add_block_to_block (&block, &lse.pre);
@@ -4035,7 +4035,7 @@ gfc_trans_scalar_assign (gfc_se * lse, g
       gfc_add_block_to_block (&block, &rse->pre);
       gfc_add_block_to_block (&block, &lse->pre);
 
-      gfc_add_modify_expr (&block, lse->expr,
+      gfc_add_modify (&block, lse->expr,
 			   fold_convert (TREE_TYPE (lse->expr), rse->expr));
 
       /* Do a deep copy if the rhs is a variable, if it is not the
@@ -4052,7 +4052,7 @@ gfc_trans_scalar_assign (gfc_se * lse, g
       gfc_add_block_to_block (&block, &lse->pre);
       gfc_add_block_to_block (&block, &rse->pre);
 
-      gfc_add_modify_expr (&block, lse->expr,
+      gfc_add_modify (&block, lse->expr,
 			   fold_convert (TREE_TYPE (lse->expr), rse->expr));
     }
 
Index: fortran/trans-array.c
===================================================================
--- fortran/trans-array.c	(revision 137784)
+++ fortran/trans-array.c	(working copy)
@@ -161,12 +161,10 @@ gfc_conv_descriptor_data_get (tree desc)
    
    This function gets called through the following macros:
      gfc_conv_descriptor_data_set
-     gfc_conv_descriptor_data_set_tuples.  */
+     gfc_conv_descriptor_data_set.  */
 
 void
-gfc_conv_descriptor_data_set_internal (stmtblock_t *block,
-				       tree desc, tree value,
-				       bool tuples_p)
+gfc_conv_descriptor_data_set (stmtblock_t *block, tree desc, tree value)
 {
   tree field, type, t;
 
@@ -177,7 +175,7 @@ gfc_conv_descriptor_data_set_internal (s
   gcc_assert (DATA_FIELD == 0);
 
   t = fold_build3 (COMPONENT_REF, TREE_TYPE (field), desc, field, NULL_TREE);
-  gfc_add_modify (block, t, fold_convert (TREE_TYPE (field), value), tuples_p);
+  gfc_add_modify (block, t, fold_convert (TREE_TYPE (field), value));
 }
 
 
@@ -547,7 +545,7 @@ gfc_trans_allocate_array_storage (stmtbl
   /* The offset is zero because we create temporaries with a zero
      lower bound.  */
   tmp = gfc_conv_descriptor_offset (desc);
-  gfc_add_modify_expr (pre, tmp, gfc_index_zero_node);
+  gfc_add_modify (pre, tmp, gfc_index_zero_node);
 
   if (dealloc && !onstack)
     {
@@ -623,7 +621,7 @@ gfc_trans_create_temp_array (stmtblock_t
 
   /* Fill in the array dtype.  */
   tmp = gfc_conv_descriptor_dtype (desc);
-  gfc_add_modify_expr (pre, tmp, gfc_get_dtype (TREE_TYPE (desc)));
+  gfc_add_modify (pre, tmp, gfc_get_dtype (TREE_TYPE (desc)));
 
   /*
      Fill in the bounds and stride.  This is a packed array, so:
@@ -657,13 +655,13 @@ gfc_trans_create_temp_array (stmtblock_t
         
       /* Store the stride and bound components in the descriptor.  */
       tmp = gfc_conv_descriptor_stride (desc, gfc_rank_cst[n]);
-      gfc_add_modify_expr (pre, tmp, size);
+      gfc_add_modify (pre, tmp, size);
 
       tmp = gfc_conv_descriptor_lbound (desc, gfc_rank_cst[n]);
-      gfc_add_modify_expr (pre, tmp, gfc_index_zero_node);
+      gfc_add_modify (pre, tmp, gfc_index_zero_node);
 
       tmp = gfc_conv_descriptor_ubound (desc, gfc_rank_cst[n]);
-      gfc_add_modify_expr (pre, tmp, loop->to[n]);
+      gfc_add_modify (pre, tmp, loop->to[n]);
 
       tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
 			 loop->to[n], gfc_index_one_node);
@@ -748,7 +746,7 @@ gfc_conv_array_transpose (gfc_se * se, g
   se->expr = dest;
 
   /* Copy across the dtype field.  */
-  gfc_add_modify_expr (&se->pre,
+  gfc_add_modify (&se->pre,
 		       gfc_conv_descriptor_dtype (dest),
 		       gfc_conv_descriptor_dtype (src));
 
@@ -765,15 +763,15 @@ gfc_conv_array_transpose (gfc_se * se, g
       dest_index = gfc_rank_cst[n];
       src_index = gfc_rank_cst[1 - n];
 
-      gfc_add_modify_expr (&se->pre,
+      gfc_add_modify (&se->pre,
 			   gfc_conv_descriptor_stride (dest, dest_index),
 			   gfc_conv_descriptor_stride (src, src_index));
 
-      gfc_add_modify_expr (&se->pre,
+      gfc_add_modify (&se->pre,
 			   gfc_conv_descriptor_lbound (dest, dest_index),
 			   gfc_conv_descriptor_lbound (src, src_index));
 
-      gfc_add_modify_expr (&se->pre,
+      gfc_add_modify (&se->pre,
 			   gfc_conv_descriptor_ubound (dest, dest_index),
 			   gfc_conv_descriptor_ubound (src, src_index));
 
@@ -799,7 +797,7 @@ gfc_conv_array_transpose (gfc_se * se, g
   else
     dest_info->offset = gfc_index_zero_node;
 
-  gfc_add_modify_expr (&se->pre,
+  gfc_add_modify (&se->pre,
 		       gfc_conv_descriptor_offset (dest),
 		       dest_info->offset);
 	  
@@ -843,7 +841,7 @@ gfc_grow_array (stmtblock_t * pblock, tr
 
   /* Add EXTRA to the upper bound.  */
   tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type, ubound, extra);
-  gfc_add_modify_expr (pblock, ubound, tmp);
+  gfc_add_modify (pblock, ubound, tmp);
 
   /* Get the value of the current data pointer.  */
   arg0 = gfc_conv_descriptor_data_get (desc);
@@ -953,7 +951,7 @@ gfc_put_offset_into_var (stmtblock_t * p
   /* We should have already created the offset variable.  We cannot
      create it here because we may be in an inner scope.  */
   gcc_assert (*offsetvar != NULL_TREE);
-  gfc_add_modify_expr (pblock, *offsetvar, *poffset);
+  gfc_add_modify (pblock, *offsetvar, *poffset);
   *poffset = *offsetvar;
   TREE_USED (*offsetvar) = 1;
 }
@@ -992,7 +990,7 @@ gfc_trans_array_ctor_element (stmtblock_
 	{
 	  /* The temporary is an array of pointers.  */
 	  se->expr = fold_convert (TREE_TYPE (tmp), se->expr);
-	  gfc_add_modify_expr (&se->pre, tmp, se->expr);
+	  gfc_add_modify (&se->pre, tmp, se->expr);
 	}
       else
 	{
@@ -1007,7 +1005,7 @@ gfc_trans_array_ctor_element (stmtblock_
 	{
 	  if (first_len)
 	    {
-	      gfc_add_modify_expr (&se->pre, first_len_val,
+	      gfc_add_modify (&se->pre, first_len_val,
 				   se->string_length);
 	      first_len = false;
 	    }
@@ -1029,7 +1027,7 @@ gfc_trans_array_ctor_element (stmtblock_
     {
       /* TODO: Should the frontend already have done this conversion?  */
       se->expr = fold_convert (TREE_TYPE (tmp), se->expr);
-      gfc_add_modify_expr (&se->pre, tmp, se->expr);
+      gfc_add_modify (&se->pre, tmp, se->expr);
     }
 
   gfc_add_block_to_block (pblock, &se->pre);
@@ -1100,7 +1098,7 @@ gfc_trans_array_constructor_subarray (st
   /* Increment the offset.  */
   tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
 		     *poffset, gfc_index_one_node);
-  gfc_add_modify_expr (&body, *poffset, tmp);
+  gfc_add_modify (&body, *poffset, tmp);
 
   /* Finish the loop.  */
   gfc_trans_scalarizing_loops (&loop, &body);
@@ -1239,7 +1237,7 @@ gfc_trans_array_constructor_value (stmtb
 	    }
 	  if (!INTEGER_CST_P (*poffset))
             {
-              gfc_add_modify_expr (&body, *offsetvar, *poffset);
+              gfc_add_modify (&body, *offsetvar, *poffset);
               *poffset = *offsetvar;
             }
 	}
@@ -1285,13 +1283,13 @@ gfc_trans_array_constructor_value (stmtb
 	  /* Make a temporary, store the current value in that
 	     and return it, once the loop is done.  */
 	  tmp_loopvar = gfc_create_var (TREE_TYPE (loopvar), "loopvar");
-	  gfc_add_modify_expr (pblock, tmp_loopvar, loopvar);
+	  gfc_add_modify (pblock, tmp_loopvar, loopvar);
 
 	  /* Initialize the loop.  */
 	  gfc_init_se (&se, NULL);
 	  gfc_conv_expr_val (&se, c->iterator->start);
 	  gfc_add_block_to_block (pblock, &se.pre);
-	  gfc_add_modify_expr (pblock, loopvar, se.expr);
+	  gfc_add_modify (pblock, loopvar, se.expr);
 
 	  gfc_init_se (&se, NULL);
 	  gfc_conv_expr_val (&se, c->iterator->end);
@@ -1344,7 +1342,7 @@ gfc_trans_array_constructor_value (stmtb
 
 	  /* Increase loop variable by step.  */
 	  tmp = fold_build2 (PLUS_EXPR, TREE_TYPE (loopvar), loopvar, step);
-	  gfc_add_modify_expr (&body, loopvar, tmp);
+	  gfc_add_modify (&body, loopvar, tmp);
 
 	  /* Finish the loop.  */
 	  tmp = gfc_finish_block (&body);
@@ -1356,7 +1354,7 @@ gfc_trans_array_constructor_value (stmtb
 	  gfc_add_expr_to_block (pblock, tmp);
 
 	  /* Restore the original value of the loop counter.  */
-	  gfc_add_modify_expr (pblock, loopvar, tmp_loopvar);
+	  gfc_add_modify (pblock, loopvar, tmp_loopvar);
 	}
     }
   mpz_clear (size);
@@ -2634,7 +2632,7 @@ gfc_trans_scalarized_loop_end (gfc_loopi
   loopbody = gfc_finish_block (pbody);
 
   /* Initialize the loopvar.  */
-  gfc_add_modify_expr (&loop->code[n], loop->loopvar[n], loop->from[n]);
+  gfc_add_modify (&loop->code[n], loop->loopvar[n], loop->from[n]);
 
   exit_label = gfc_build_label_decl (NULL_TREE);
 
@@ -2655,7 +2653,7 @@ gfc_trans_scalarized_loop_end (gfc_loopi
   /* Increment the loopvar.  */
   tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
 		     loop->loopvar[n], gfc_index_one_node);
-  gfc_add_modify_expr (&block, loop->loopvar[n], tmp);
+  gfc_add_modify (&block, loop->loopvar[n], tmp);
 
   /* Build the loop.  */
   tmp = gfc_finish_block (&block);
@@ -3609,7 +3607,7 @@ gfc_array_init_size (tree descriptor, in
 
   /* Set the dtype.  */
   tmp = gfc_conv_descriptor_dtype (descriptor);
-  gfc_add_modify_expr (pblock, tmp, gfc_get_dtype (TREE_TYPE (descriptor)));
+  gfc_add_modify (pblock, tmp, gfc_get_dtype (TREE_TYPE (descriptor)));
 
   or_expr = NULL_TREE;
 
@@ -3640,7 +3638,7 @@ gfc_array_init_size (tree descriptor, in
             }
 	}
       tmp = gfc_conv_descriptor_lbound (descriptor, gfc_rank_cst[n]);
-      gfc_add_modify_expr (pblock, tmp, se.expr);
+      gfc_add_modify (pblock, tmp, se.expr);
 
       /* Work out the offset for this component.  */
       tmp = fold_build2 (MULT_EXPR, gfc_array_index_type, se.expr, stride);
@@ -3657,11 +3655,11 @@ gfc_array_init_size (tree descriptor, in
       gfc_add_block_to_block (pblock, &se.pre);
 
       tmp = gfc_conv_descriptor_ubound (descriptor, gfc_rank_cst[n]);
-      gfc_add_modify_expr (pblock, tmp, se.expr);
+      gfc_add_modify (pblock, tmp, se.expr);
 
       /* Store the stride.  */
       tmp = gfc_conv_descriptor_stride (descriptor, gfc_rank_cst[n]);
-      gfc_add_modify_expr (pblock, tmp, stride);
+      gfc_add_modify (pblock, tmp, stride);
 
       /* Calculate the size of this dimension.  */
       size = fold_build2 (PLUS_EXPR, gfc_array_index_type, se.expr, size);
@@ -3701,11 +3699,11 @@ gfc_array_init_size (tree descriptor, in
 
   var = gfc_create_var (TREE_TYPE (size), "size");
   gfc_start_block (&thenblock);
-  gfc_add_modify_expr (&thenblock, var, gfc_index_zero_node);
+  gfc_add_modify (&thenblock, var, gfc_index_zero_node);
   thencase = gfc_finish_block (&thenblock);
 
   gfc_start_block (&elseblock);
-  gfc_add_modify_expr (&elseblock, var, size);
+  gfc_add_modify (&elseblock, var, size);
   elsecase = gfc_finish_block (&elseblock);
 
   tmp = gfc_evaluate_now (or_expr, pblock);
@@ -3791,7 +3789,7 @@ gfc_array_allocate (gfc_se * se, gfc_exp
   gfc_add_expr_to_block (&se->pre, tmp);
 
   tmp = gfc_conv_descriptor_offset (se->expr);
-  gfc_add_modify_expr (&se->pre, tmp, offset);
+  gfc_add_modify (&se->pre, tmp, offset);
 
   if (expr->ts.type == BT_DERIVED
 	&& expr->ts.derived->attr.alloc_comp)
@@ -3989,7 +3987,7 @@ gfc_trans_array_bounds (tree type, gfc_s
           gfc_init_se (&se, NULL);
           gfc_conv_expr_type (&se, as->lower[dim], gfc_array_index_type);
           gfc_add_block_to_block (pblock, &se.pre);
-          gfc_add_modify_expr (pblock, lbound, se.expr);
+          gfc_add_modify (pblock, lbound, se.expr);
         }
       ubound = GFC_TYPE_ARRAY_UBOUND (type, dim);
       if (as->upper[dim] && !INTEGER_CST_P (ubound))
@@ -3997,7 +3995,7 @@ gfc_trans_array_bounds (tree type, gfc_s
           gfc_init_se (&se, NULL);
           gfc_conv_expr_type (&se, as->upper[dim], gfc_array_index_type);
           gfc_add_block_to_block (pblock, &se.pre);
-          gfc_add_modify_expr (pblock, ubound, se.expr);
+          gfc_add_modify (pblock, ubound, se.expr);
         }
       /* The offset of this dimension.  offset = offset - lbound * stride.  */
       tmp = fold_build2 (MULT_EXPR, gfc_array_index_type, lbound, size);
@@ -4017,7 +4015,7 @@ gfc_trans_array_bounds (tree type, gfc_s
           tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type, ubound, tmp);
           tmp = fold_build2 (MULT_EXPR, gfc_array_index_type, size, tmp);
           if (stride)
-            gfc_add_modify_expr (pblock, stride, tmp);
+            gfc_add_modify (pblock, stride, tmp);
           else
             stride = gfc_evaluate_now (tmp, pblock);
 
@@ -4027,7 +4025,7 @@ gfc_trans_array_bounds (tree type, gfc_s
 			     stride, gfc_index_zero_node);
 	  tmp = fold_build3 (COND_EXPR, gfc_array_index_type, tmp,
 			     stride, gfc_index_zero_node);
-	  gfc_add_modify_expr (pblock, stride, tmp);
+	  gfc_add_modify (pblock, stride, tmp);
         }
 
       size = stride;
@@ -4100,7 +4098,7 @@ gfc_trans_auto_array_allocation (tree de
   if (sym->attr.cray_pointee)
     {
       if (TREE_CODE (GFC_TYPE_ARRAY_OFFSET (type)) == VAR_DECL)
-	gfc_add_modify_expr (&block, GFC_TYPE_ARRAY_OFFSET (type), offset);
+	gfc_add_modify (&block, GFC_TYPE_ARRAY_OFFSET (type), offset);
       gfc_add_expr_to_block (&block, fnbody);
       return gfc_finish_block (&block);
     }
@@ -4113,11 +4111,11 @@ gfc_trans_auto_array_allocation (tree de
 
   /* Allocate memory to hold the data.  */
   tmp = gfc_call_malloc (&block, TREE_TYPE (decl), size);
-  gfc_add_modify_expr (&block, decl, tmp);
+  gfc_add_modify (&block, decl, tmp);
 
   /* Set offset of the array.  */
   if (TREE_CODE (GFC_TYPE_ARRAY_OFFSET (type)) == VAR_DECL)
-    gfc_add_modify_expr (&block, GFC_TYPE_ARRAY_OFFSET (type), offset);
+    gfc_add_modify (&block, GFC_TYPE_ARRAY_OFFSET (type), offset);
 
 
   /* Automatic arrays should not have initializers.  */
@@ -4165,13 +4163,13 @@ gfc_trans_g77_array (gfc_symbol * sym, t
 
   /* Set the offset.  */
   if (TREE_CODE (GFC_TYPE_ARRAY_OFFSET (type)) == VAR_DECL)
-    gfc_add_modify_expr (&block, GFC_TYPE_ARRAY_OFFSET (type), offset);
+    gfc_add_modify (&block, GFC_TYPE_ARRAY_OFFSET (type), offset);
 
   /* Set the pointer itself if we aren't using the parameter directly.  */
   if (TREE_CODE (parm) != PARM_DECL)
     {
       tmp = convert (TREE_TYPE (parm), GFC_DECL_SAVED_DESCRIPTOR (parm));
-      gfc_add_modify_expr (&block, parm, tmp);
+      gfc_add_modify (&block, parm, tmp);
     }
   stmt = gfc_finish_block (&block);
 
@@ -4266,7 +4264,7 @@ gfc_trans_dummy_array_bias (gfc_symbol *
       TREE_USED (partial) = 1;
       tmp = gfc_conv_descriptor_stride (dumdesc, gfc_rank_cst[0]);
       tmp = fold_build2 (EQ_EXPR, boolean_type_node, tmp, gfc_index_one_node);
-      gfc_add_modify_expr (&block, partial, tmp);
+      gfc_add_modify (&block, partial, tmp);
     }
   else
     {
@@ -4286,7 +4284,7 @@ gfc_trans_dummy_array_bias (gfc_symbol *
       tmp = fold_build3 (COND_EXPR, gfc_array_index_type, tmp,
 			 gfc_index_one_node, stride);
       stride = GFC_TYPE_ARRAY_STRIDE (type, 0);
-      gfc_add_modify_expr (&block, stride, tmp);
+      gfc_add_modify (&block, stride, tmp);
 
       /* Allow the user to disable array repacking.  */
       stmt_unpacked = NULL_TREE;
@@ -4317,7 +4315,7 @@ gfc_trans_dummy_array_bias (gfc_symbol *
     }
   else
     tmp = stmt_packed != NULL_TREE ? stmt_packed : stmt_unpacked;
-  gfc_add_modify_expr (&block, tmpdesc, fold_convert (type, tmp));
+  gfc_add_modify (&block, tmpdesc, fold_convert (type, tmp));
 
   offset = gfc_index_zero_node;
   size = gfc_index_one_node;
@@ -4344,7 +4342,7 @@ gfc_trans_dummy_array_bias (gfc_symbol *
           gfc_conv_expr_type (&se, sym->as->lower[n],
                               gfc_array_index_type);
           gfc_add_block_to_block (&block, &se.pre);
-          gfc_add_modify_expr (&block, lbound, se.expr);
+          gfc_add_modify (&block, lbound, se.expr);
         }
 
       ubound = GFC_TYPE_ARRAY_UBOUND (type, n);
@@ -4358,7 +4356,7 @@ gfc_trans_dummy_array_bias (gfc_symbol *
 	      gfc_conv_expr_type (&se, sym->as->upper[n],
                                   gfc_array_index_type);
 	      gfc_add_block_to_block (&block, &se.pre);
-              gfc_add_modify_expr (&block, ubound, se.expr);
+              gfc_add_modify (&block, ubound, se.expr);
             }
 
 	  /* Check the sizes match.  */
@@ -4385,7 +4383,7 @@ gfc_trans_dummy_array_bias (gfc_symbol *
           tmp = fold_build2 (MINUS_EXPR, gfc_array_index_type,
 			     dubound, dlbound);
           tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type, tmp, lbound);
-          gfc_add_modify_expr (&block, ubound, tmp);
+          gfc_add_modify (&block, ubound, tmp);
 	}
       /* The offset of this dimension.  offset = offset - lbound * stride.  */
       tmp = fold_build2 (MULT_EXPR, gfc_array_index_type, lbound, stride);
@@ -4425,7 +4423,7 @@ gfc_trans_dummy_array_bias (gfc_symbol *
 				   stmt_unpacked, stmt_packed);
               else
                 tmp = (stmt_packed != NULL_TREE) ? stmt_packed : stmt_unpacked;
-              gfc_add_modify_expr (&block, stride, tmp);
+              gfc_add_modify (&block, stride, tmp);
             }
         }
       else
@@ -4441,14 +4439,14 @@ gfc_trans_dummy_array_bias (gfc_symbol *
 				 ubound, tmp);
 	      tmp = fold_build2 (MULT_EXPR, gfc_array_index_type,
 				 GFC_TYPE_ARRAY_STRIDE (type, n), tmp);
-	      gfc_add_modify_expr (&block, stride, tmp);
+	      gfc_add_modify (&block, stride, tmp);
 	    }
 	}
     }
 
   /* Set the offset.  */
   if (TREE_CODE (GFC_TYPE_ARRAY_OFFSET (type)) == VAR_DECL)
-    gfc_add_modify_expr (&block, GFC_TYPE_ARRAY_OFFSET (type), offset);
+    gfc_add_modify (&block, GFC_TYPE_ARRAY_OFFSET (type), offset);
 
   gfc_trans_vla_type_sizes (sym, &block);
 
@@ -4743,7 +4741,7 @@ gfc_conv_expr_descriptor (gfc_se * se, g
 	  if (se->direct_byref)
 	    {
 	      /* Copy the descriptor for pointer assignments.  */
-	      gfc_add_modify_expr (&se->pre, se->expr, desc);
+	      gfc_add_modify (&se->pre, se->expr, desc);
 
 	      /* Add any offsets from subreferences.  */
 	      gfc_get_dataptr_offset (&se->pre, se->expr, desc, NULL_TREE,
@@ -4976,7 +4974,7 @@ gfc_conv_expr_descriptor (gfc_se * se, g
 
       /* Set the dtype.  */
       tmp = gfc_conv_descriptor_dtype (parm);
-      gfc_add_modify_expr (&loop.pre, tmp, gfc_get_dtype (parmtype));
+      gfc_add_modify (&loop.pre, tmp, gfc_get_dtype (parmtype));
 
       /* Set offset for assignments to pointer only to zero if it is not
          the full array.  */
@@ -5045,11 +5043,11 @@ gfc_conv_expr_descriptor (gfc_se * se, g
 	      from = gfc_index_one_node;
 	    }
 	  tmp = gfc_conv_descriptor_lbound (parm, gfc_rank_cst[dim]);
-	  gfc_add_modify_expr (&loop.pre, tmp, from);
+	  gfc_add_modify (&loop.pre, tmp, from);
 
 	  /* Set the new upper bound.  */
 	  tmp = gfc_conv_descriptor_ubound (parm, gfc_rank_cst[dim]);
-	  gfc_add_modify_expr (&loop.pre, tmp, to);
+	  gfc_add_modify (&loop.pre, tmp, to);
 
 	  /* Multiply the stride by the section stride to get the
 	     total stride.  */
@@ -5074,7 +5072,7 @@ gfc_conv_expr_descriptor (gfc_se * se, g
 
 	  /* Store the new stride.  */
 	  tmp = gfc_conv_descriptor_stride (parm, gfc_rank_cst[dim]);
-	  gfc_add_modify_expr (&loop.pre, tmp, stride);
+	  gfc_add_modify (&loop.pre, tmp, stride);
 
 	  dim++;
 	}
@@ -5091,14 +5089,14 @@ gfc_conv_expr_descriptor (gfc_se * se, g
 	{
 	  /* Set the offset.  */
 	  tmp = gfc_conv_descriptor_offset (parm);
-	  gfc_add_modify_expr (&loop.pre, tmp, base);
+	  gfc_add_modify (&loop.pre, tmp, base);
 	}
       else
 	{
 	  /* Only the callee knows what the correct offset it, so just set
 	     it to zero here.  */
 	  tmp = gfc_conv_descriptor_offset (parm);
-	  gfc_add_modify_expr (&loop.pre, tmp, gfc_index_zero_node);
+	  gfc_add_modify (&loop.pre, tmp, gfc_index_zero_node);
 	}
       desc = parm;
     }
@@ -5521,7 +5519,7 @@ structure_alloc_comps (gfc_symbol * der_
 	    {
 	      rank = c->as ? c->as->rank : 0;
 	      tmp = fold_convert (TREE_TYPE (dcmp), comp);
-	      gfc_add_modify_expr (&fnblock, dcmp, tmp);
+	      gfc_add_modify (&fnblock, dcmp, tmp);
 	      tmp = structure_alloc_comps (c->ts.derived, comp, dcmp,
 					   rank, purpose);
 	      gfc_add_expr_to_block (&fnblock, tmp);
Index: fortran/trans-array.h
===================================================================
--- fortran/trans-array.h	(revision 137784)
+++ fortran/trans-array.h	(working copy)
@@ -118,11 +118,7 @@ tree gfc_conv_array_ubound (tree, int);
 
 /* Build expressions for accessing components of an array descriptor.  */
 tree gfc_conv_descriptor_data_get (tree);
-void gfc_conv_descriptor_data_set_internal (stmtblock_t *, tree, tree, bool);
-#define gfc_conv_descriptor_data_set(BLOCK, T1, T2)			\
-  gfc_conv_descriptor_data_set_internal ((BLOCK), (T1), (T2), false)
-#define gfc_conv_descriptor_data_set_tuples(BLOCK, T1, T2)		\
-  gfc_conv_descriptor_data_set_internal ((BLOCK), (T1), (T2), true)
+void gfc_conv_descriptor_data_set (stmtblock_t *, tree, tree);
 tree gfc_conv_descriptor_data_addr (tree);
 tree gfc_conv_descriptor_offset (tree);
 tree gfc_conv_descriptor_dtype (tree);
Index: fortran/trans-openmp.c
===================================================================
--- fortran/trans-openmp.c	(revision 137784)
+++ fortran/trans-openmp.c	(working copy)
@@ -147,7 +147,7 @@ gfc_omp_clause_default_ctor (tree clause
 
   gfc_init_block (&cond_block);
 
-  gfc_add_modify_expr (&cond_block, decl, outer);
+  gfc_add_modify (&cond_block, decl, outer);
   rank = gfc_rank_cst[GFC_TYPE_ARRAY_RANK (type) - 1];
   size = gfc_conv_descriptor_ubound (decl, rank);
   size = fold_build2 (MINUS_EXPR, gfc_array_index_type, size,
@@ -164,11 +164,11 @@ gfc_omp_clause_default_ctor (tree clause
   ptr = gfc_allocate_array_with_status (&cond_block,
 					build_int_cst (pvoid_type_node, 0),
 					size, NULL);
-  gfc_conv_descriptor_data_set_tuples (&cond_block, decl, ptr);
+  gfc_conv_descriptor_data_set (&cond_block, decl, ptr);
   then_b = gfc_finish_block (&cond_block);
 
   gfc_init_block (&cond_block);
-  gfc_conv_descriptor_data_set_tuples (&cond_block, decl, null_pointer_node);
+  gfc_conv_descriptor_data_set (&cond_block, decl, null_pointer_node);
   else_b = gfc_finish_block (&cond_block);
 
   cond = fold_build2 (NE_EXPR, boolean_type_node,
@@ -191,7 +191,7 @@ gfc_omp_clause_copy_ctor (tree clause, t
 
   if (! GFC_DESCRIPTOR_TYPE_P (type)
       || GFC_TYPE_ARRAY_AKIND (type) != GFC_ARRAY_ALLOCATABLE)
-    return build_gimple_modify_stmt (dest, src);
+    return build2_v (MODIFY_EXPR, dest, src);
 
   gcc_assert (OMP_CLAUSE_CODE (clause) == OMP_CLAUSE_FIRSTPRIVATE);
 
@@ -199,7 +199,7 @@ gfc_omp_clause_copy_ctor (tree clause, t
      and copied from SRC.  */
   gfc_start_block (&block);
 
-  gfc_add_modify_expr (&block, dest, src);
+  gfc_add_modify (&block, dest, src);
   rank = gfc_rank_cst[GFC_TYPE_ARRAY_RANK (type) - 1];
   size = gfc_conv_descriptor_ubound (dest, rank);
   size = fold_build2 (MINUS_EXPR, gfc_array_index_type, size,
@@ -216,7 +216,7 @@ gfc_omp_clause_copy_ctor (tree clause, t
   ptr = gfc_allocate_array_with_status (&block,
 					build_int_cst (pvoid_type_node, 0),
 					size, NULL);
-  gfc_conv_descriptor_data_set_tuples (&block, dest, ptr);
+  gfc_conv_descriptor_data_set (&block, dest, ptr);
   call = build_call_expr (built_in_decls[BUILT_IN_MEMCPY], 3, ptr,
 			  fold_convert (pvoid_type_node,
 					gfc_conv_descriptor_data_get (src)),
@@ -236,7 +236,7 @@ gfc_omp_clause_assign_op (tree clause AT
 
   if (! GFC_DESCRIPTOR_TYPE_P (type)
       || GFC_TYPE_ARRAY_AKIND (type) != GFC_ARRAY_ALLOCATABLE)
-    return build_gimple_modify_stmt (dest, src);
+    return build2_v (MODIFY_EXPR, dest, src);
 
   /* Handle copying allocatable arrays.  */
   gfc_start_block (&block);
@@ -602,7 +602,7 @@ gfc_trans_omp_array_reduction (tree c, g
 
       gfc_start_block (&block);
 
-      gfc_add_modify_expr (&block, decl, outer_sym.backend_decl);
+      gfc_add_modify (&block, decl, outer_sym.backend_decl);
       rank = gfc_rank_cst[GFC_TYPE_ARRAY_RANK (type) - 1];
       size = gfc_conv_descriptor_ubound (decl, rank);
       size = fold_build2 (MINUS_EXPR, gfc_array_index_type, size,
@@ -619,7 +619,7 @@ gfc_trans_omp_array_reduction (tree c, g
       ptr = gfc_allocate_array_with_status (&block,
 					    build_int_cst (pvoid_type_node, 0),
 					    size, NULL);
-      gfc_conv_descriptor_data_set_tuples (&block, decl, ptr);
+      gfc_conv_descriptor_data_set (&block, decl, ptr);
       gfc_add_expr_to_block (&block, gfc_trans_assignment (e1, e2, false));
       stmt = gfc_finish_block (&block);
     }
@@ -1062,7 +1062,7 @@ gfc_trans_omp_atomic (gfc_code *code)
 	  tree accum = gfc_create_var (TREE_TYPE (rse.expr), NULL);
 	  gfc_actual_arglist *arg;
 
-	  gfc_add_modify_stmt (&block, accum, rse.expr);
+	  gfc_add_modify (&block, accum, rse.expr);
 	  for (arg = expr2->value.function.actual->next->next; arg;
 	       arg = arg->next)
 	    {
@@ -1070,7 +1070,7 @@ gfc_trans_omp_atomic (gfc_code *code)
 	      gfc_conv_expr (&rse, arg->expr);
 	      gfc_add_block_to_block (&block, &rse.pre);
 	      x = fold_build2 (op, TREE_TYPE (accum), accum, rse.expr);
-	      gfc_add_modify_stmt (&block, accum, x);
+	      gfc_add_modify (&block, accum, x);
 	    }
 
 	  rse.expr = accum;
@@ -1204,11 +1204,11 @@ gfc_trans_omp_do (gfc_code *code, stmtbl
       /* Loop body.  */
       if (simple)
 	{
-	  TREE_VEC_ELT (init, i) = build2_v (GIMPLE_MODIFY_STMT, dovar, from);
+	  TREE_VEC_ELT (init, i) = build2_v (MODIFY_EXPR, dovar, from);
 	  TREE_VEC_ELT (cond, i) = fold_build2 (simple > 0 ? LE_EXPR : GE_EXPR,
 						boolean_type_node, dovar, to);
 	  TREE_VEC_ELT (incr, i) = fold_build2 (PLUS_EXPR, type, dovar, step);
-	  TREE_VEC_ELT (incr, i) = fold_build2 (GIMPLE_MODIFY_STMT, type, dovar,
+	  TREE_VEC_ELT (incr, i) = fold_build2 (MODIFY_EXPR, type, dovar,
 						TREE_VEC_ELT (incr, i));
 	}
       else
@@ -1225,13 +1225,13 @@ gfc_trans_omp_do (gfc_code *code, stmtbl
 	  tmp = fold_build2 (TRUNC_DIV_EXPR, type, tmp, step);
 	  tmp = gfc_evaluate_now (tmp, pblock);
 	  count = gfc_create_var (type, "count");
-	  TREE_VEC_ELT (init, i) = build2_v (GIMPLE_MODIFY_STMT, count,
+	  TREE_VEC_ELT (init, i) = build2_v (MODIFY_EXPR, count,
 					     build_int_cst (type, 0));
 	  TREE_VEC_ELT (cond, i) = fold_build2 (LT_EXPR, boolean_type_node,
 						count, tmp);
 	  TREE_VEC_ELT (incr, i) = fold_build2 (PLUS_EXPR, type, count,
 						build_int_cst (type, 1));
-	  TREE_VEC_ELT (incr, i) = fold_build2 (GIMPLE_MODIFY_STMT, type,
+	  TREE_VEC_ELT (incr, i) = fold_build2 (MODIFY_EXPR, type,
 						count, TREE_VEC_ELT (incr, i));
 
 	  /* Initialize DOVAR.  */
@@ -1260,7 +1260,7 @@ gfc_trans_omp_do (gfc_code *code, stmtbl
 		 than value after iterator increment.  */
 	      tmp = gfc_evaluate_now (step, pblock);
 	      tmp = fold_build2 (PLUS_EXPR, type, dovar, tmp);
-	      tmp = fold_build2 (GIMPLE_MODIFY_STMT, type, dovar, tmp);
+	      tmp = fold_build2 (MODIFY_EXPR, type, dovar, tmp);
 	      for (c = omp_clauses; c ; c = OMP_CLAUSE_CHAIN (c))
 		if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_LASTPRIVATE
 		    && OMP_CLAUSE_DECL (c) == dovar)
@@ -1308,7 +1308,7 @@ gfc_trans_omp_do (gfc_code *code, stmtbl
   dovar_init = nreverse (dovar_init);
   while (dovar_init)
     {
-      gfc_add_modify_stmt (&body, TREE_PURPOSE (dovar_init),
+      gfc_add_modify (&body, TREE_PURPOSE (dovar_init),
 			   TREE_VALUE (dovar_init));
       dovar_init = TREE_CHAIN (dovar_init);
     }
Index: fortran/trans-stmt.c
===================================================================
--- fortran/trans-stmt.c	(revision 137784)
+++ fortran/trans-stmt.c	(working copy)
@@ -127,8 +127,8 @@ gfc_trans_label_assign (gfc_code * code)
       label_tree = gfc_build_addr_expr (pvoid_type_node, label_tree);
     }
 
-  gfc_add_modify_expr (&se.pre, len, len_tree);
-  gfc_add_modify_expr (&se.pre, addr, label_tree);
+  gfc_add_modify (&se.pre, len, len_tree);
+  gfc_add_modify (&se.pre, addr, label_tree);
 
   return gfc_finish_block (&se.pre);
 }
@@ -270,9 +270,9 @@ gfc_conv_elemental_dependencies (gfc_se 
 	  tmp = gfc_trans_create_temp_array (&se->pre, &se->post,
 					      &tmp_loop, info, tmp,
 					      false, true, false);
-	  gfc_add_modify_expr (&se->pre, size, tmp);
+	  gfc_add_modify (&se->pre, size, tmp);
 	  tmp = fold_convert (pvoid_type_node, info->data);
-	  gfc_add_modify_expr (&se->pre, data, tmp);
+	  gfc_add_modify (&se->pre, data, tmp);
 	  gfc_merge_block_scope (&block);
 
 	  /* Obtain the argument descriptor for unpacking.  */
@@ -293,7 +293,7 @@ gfc_conv_elemental_dependencies (gfc_se 
 					  offset, tmp);
 	    }
 	  info->offset = gfc_create_var (gfc_array_index_type, NULL);	  
-	  gfc_add_modify_expr (&se->pre, info->offset, offset);
+	  gfc_add_modify (&se->pre, info->offset, offset);
 
 	  /* Copy the result back using unpack.  */
 	  tmp = build_call_expr (gfor_fndecl_in_unpack, 2, parmse.expr, data);
@@ -348,7 +348,7 @@ gfc_trans_call (gfc_code * code, bool de
 	  se.expr = convert (gfc_typenode_for_spec (&sym->ts), se.expr);
 	  if (sym->backend_decl == NULL)
 	    sym->backend_decl = gfc_get_symbol_decl (sym);
-	  gfc_add_modify_expr (&se.pre, sym->backend_decl, se.expr);
+	  gfc_add_modify (&se.pre, sym->backend_decl, se.expr);
 	}
       else
 	gfc_add_expr_to_block (&se.pre, se.expr);
@@ -733,7 +733,7 @@ gfc_trans_simple_do (gfc_code * code, st
   type = TREE_TYPE (dovar);
 
   /* Initialize the DO variable: dovar = from.  */
-  gfc_add_modify_expr (pblock, dovar, from);
+  gfc_add_modify (pblock, dovar, from);
 
   /* Cycle and exit statements are implemented with gotos.  */
   cycle_label = gfc_build_label_decl (NULL_TREE);
@@ -762,7 +762,7 @@ gfc_trans_simple_do (gfc_code * code, st
 
   /* Increment the loop variable.  */
   tmp = fold_build2 (PLUS_EXPR, type, dovar, step);
-  gfc_add_modify_expr (&body, dovar, tmp);
+  gfc_add_modify (&body, dovar, tmp);
 
   /* The loop exit.  */
   tmp = build1_v (GOTO_EXPR, exit_label);
@@ -910,7 +910,7 @@ gfc_trans_do (gfc_code * code)
       tmp = fold_build1 (FIX_TRUNC_EXPR, utype, tmp);
     }
   countm1 = gfc_create_var (utype, "countm1");
-  gfc_add_modify_expr (&block, countm1, tmp);
+  gfc_add_modify (&block, countm1, tmp);
 
   /* Cycle and exit statements are implemented with gotos.  */
   cycle_label = gfc_build_label_decl (NULL_TREE);
@@ -918,7 +918,7 @@ gfc_trans_do (gfc_code * code)
   TREE_USED (exit_label) = 1;
 
   /* Initialize the DO variable: dovar = from.  */
-  gfc_add_modify_expr (&block, dovar, from);
+  gfc_add_modify (&block, dovar, from);
 
   /* If the loop is empty, go directly to the exit label.  */
   tmp = fold_build3 (COND_EXPR, void_type_node, empty,
@@ -948,7 +948,7 @@ gfc_trans_do (gfc_code * code)
 
   /* Increment the loop variable.  */
   tmp = fold_build2 (PLUS_EXPR, type, dovar, step);
-  gfc_add_modify_expr (&body, dovar, tmp);
+  gfc_add_modify (&body, dovar, tmp);
 
   /* End with the loop condition.  Loop until countm1 == 0.  */
   cond = fold_build2 (EQ_EXPR, boolean_type_node, countm1,
@@ -960,7 +960,7 @@ gfc_trans_do (gfc_code * code)
 
   /* Decrement the loop count.  */
   tmp = fold_build2 (MINUS_EXPR, utype, countm1, build_int_cst (utype, 1));
-  gfc_add_modify_expr (&body, countm1, tmp);
+  gfc_add_modify (&body, countm1, tmp);
 
   /* End of loop body.  */
   tmp = gfc_finish_block (&body);
@@ -1478,7 +1478,7 @@ gfc_trans_character_select (gfc_code *co
   tmp = build_call_expr (fndecl, 4, init, build_int_cst (NULL_TREE, n),
 			 se.expr, se.string_length);
   case_num = gfc_create_var (integer_type_node, "case_num");
-  gfc_add_modify_expr (&block, case_num, tmp);
+  gfc_add_modify (&block, case_num, tmp);
 
   gfc_add_block_to_block (&block, &se.post);
 
@@ -1608,7 +1608,7 @@ forall_make_variable_temp (gfc_code *c, 
 	{
 	  /* Use the variable offset for the temporary.  */
 	  tmp = gfc_conv_descriptor_offset (tse.expr);
-	  gfc_add_modify_expr (pre, tmp,
+	  gfc_add_modify (pre, tmp,
 		gfc_conv_array_offset (old_sym->backend_decl));
 	}
     }
@@ -1764,7 +1764,7 @@ gfc_trans_forall_loop (forall_info *fora
 
   /* Initialize the mask index outside the FORALL nest.  */
   if (mask_flag && forall_tmp->mask)
-    gfc_add_modify_expr (outer, forall_tmp->maskindex, gfc_index_zero_node);
+    gfc_add_modify (outer, forall_tmp->maskindex, gfc_index_zero_node);
 
   iter = forall_tmp->this_loop;
   nvar = forall_tmp->nvar;
@@ -1797,7 +1797,7 @@ gfc_trans_forall_loop (forall_info *fora
 
       /* Increment the loop variable.  */
       tmp = fold_build2 (PLUS_EXPR, TREE_TYPE (var), var, step);
-      gfc_add_modify_expr (&block, var, tmp);
+      gfc_add_modify (&block, var, tmp);
 
       /* Advance to the next mask element.  Only do this for the
 	 innermost loop.  */
@@ -1806,26 +1806,26 @@ gfc_trans_forall_loop (forall_info *fora
 	  tree maskindex = forall_tmp->maskindex;
 	  tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
 			     maskindex, gfc_index_one_node);
-	  gfc_add_modify_expr (&block, maskindex, tmp);
+	  gfc_add_modify (&block, maskindex, tmp);
 	}
 
       /* Decrement the loop counter.  */
       tmp = fold_build2 (MINUS_EXPR, TREE_TYPE (var), count,
 			 build_int_cst (TREE_TYPE (var), 1));
-      gfc_add_modify_expr (&block, count, tmp);
+      gfc_add_modify (&block, count, tmp);
 
       body = gfc_finish_block (&block);
 
       /* Loop var initialization.  */
       gfc_init_block (&block);
-      gfc_add_modify_expr (&block, var, start);
+      gfc_add_modify (&block, var, start);
 
 
       /* Initialize the loop counter.  */
       tmp = fold_build2 (MINUS_EXPR, TREE_TYPE (var), step, start);
       tmp = fold_build2 (PLUS_EXPR, TREE_TYPE (var), end, tmp);
       tmp = fold_build2 (TRUNC_DIV_EXPR, TREE_TYPE (var), tmp, step);
-      gfc_add_modify_expr (&block, count, tmp);
+      gfc_add_modify (&block, count, tmp);
 
       /* The loop expression.  */
       tmp = build1_v (LOOP_EXPR, body);
@@ -1917,7 +1917,7 @@ gfc_do_allocate (tree bytesize, tree siz
       *pdata = convert (pvoid_type_node, tmpvar);
 
       tmp = gfc_call_malloc (pblock, TREE_TYPE (tmpvar), bytesize);
-      gfc_add_modify_expr (pblock, tmpvar, tmp);
+      gfc_add_modify (pblock, tmpvar, tmp);
     }
   return tmpvar;
 }
@@ -1953,13 +1953,13 @@ generate_loop_for_temp_to_lhs (gfc_expr 
 
       /* Use the scalar assignment as is.  */
       gfc_add_block_to_block (&block, &lse.pre);
-      gfc_add_modify_expr (&block, lse.expr, tmp);
+      gfc_add_modify (&block, lse.expr, tmp);
       gfc_add_block_to_block (&block, &lse.post);
 
       /* Increment the count1.  */
       tmp = fold_build2 (PLUS_EXPR, TREE_TYPE (count1), count1,
 			 gfc_index_one_node);
-      gfc_add_modify_expr (&block, count1, tmp);
+      gfc_add_modify (&block, count1, tmp);
 
       tmp = gfc_finish_block (&block);
     }
@@ -2015,14 +2015,14 @@ generate_loop_for_temp_to_lhs (gfc_expr 
       /* Increment count1.  */
       tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
 			 count1, gfc_index_one_node);
-      gfc_add_modify_expr (&body, count1, tmp);
+      gfc_add_modify (&body, count1, tmp);
 
       /* Increment count3.  */
       if (count3)
 	{
 	  tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
 			     count3, gfc_index_one_node);
-	  gfc_add_modify_expr (&body, count3, tmp);
+	  gfc_add_modify (&body, count3, tmp);
 	}
 
       /* Generate the copying loops.  */
@@ -2116,21 +2116,21 @@ generate_loop_for_rhs_to_temp (gfc_expr 
       /* Increment count1.  */
       tmp = fold_build2 (PLUS_EXPR, TREE_TYPE (count1), count1,
 			 gfc_index_one_node);
-      gfc_add_modify_expr (&block, count1, tmp);
+      gfc_add_modify (&block, count1, tmp);
     }
   else
     {
       /* Increment count1.  */
       tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
 			 count1, gfc_index_one_node);
-      gfc_add_modify_expr (&body1, count1, tmp);
+      gfc_add_modify (&body1, count1, tmp);
 
       /* Increment count3.  */
       if (count3)
 	{
 	  tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
 			     count3, gfc_index_one_node);
-	  gfc_add_modify_expr (&body1, count3, tmp);
+	  gfc_add_modify (&body1, count3, tmp);
 	}
 
       /* Generate the copying loops.  */
@@ -2256,7 +2256,7 @@ compute_overall_iter_number (forall_info
 
   /* Otherwise, create a temporary variable to compute the result.  */
   number = gfc_create_var (gfc_array_index_type, "num");
-  gfc_add_modify_expr (block, number, gfc_index_zero_node);
+  gfc_add_modify (block, number, gfc_index_zero_node);
 
   gfc_start_block (&body);
   if (inner_size_body)
@@ -2266,7 +2266,7 @@ compute_overall_iter_number (forall_info
 		       number, inner_size);
   else
     tmp = inner_size;
-  gfc_add_modify_expr (&body, number, tmp);
+  gfc_add_modify (&body, number, tmp);
   tmp = gfc_finish_block (&body);
 
   /* Generate loops.  */
@@ -2377,13 +2377,13 @@ gfc_trans_assign_need_temp (gfc_expr * e
   if (wheremask)
     {
       count = gfc_create_var (gfc_array_index_type, "count");
-      gfc_add_modify_expr (block, count, gfc_index_zero_node);
+      gfc_add_modify (block, count, gfc_index_zero_node);
     }
   else
     count = NULL;
 
   /* Initialize count1.  */
-  gfc_add_modify_expr (block, count1, gfc_index_zero_node);
+  gfc_add_modify (block, count1, gfc_index_zero_node);
 
   /* Calculate the size of temporary needed in the assignment. Return loop, lss
      and rss which are used in function generate_loop_for_rhs_to_temp().  */
@@ -2422,11 +2422,11 @@ gfc_trans_assign_need_temp (gfc_expr * e
   gfc_add_expr_to_block (block, tmp);
 
   /* Reset count1.  */
-  gfc_add_modify_expr (block, count1, gfc_index_zero_node);
+  gfc_add_modify (block, count1, gfc_index_zero_node);
 
   /* Reset count.  */
   if (wheremask)
-    gfc_add_modify_expr (block, count, gfc_index_zero_node);
+    gfc_add_modify (block, count, gfc_index_zero_node);
 
   /* Generate codes to copy the temporary to lhs.  */
   tmp = generate_loop_for_temp_to_lhs (expr1, tmp1, count, count1,
@@ -2468,7 +2468,7 @@ gfc_trans_pointer_assign_need_temp (gfc_
   tree tmp, tmp1, ptemp1;
 
   count = gfc_create_var (gfc_array_index_type, "count");
-  gfc_add_modify_expr (block, count, gfc_index_zero_node);
+  gfc_add_modify (block, count, gfc_index_zero_node);
 
   inner_size = integer_one_node;
   lss = gfc_walk_expr (expr1);
@@ -2489,14 +2489,14 @@ gfc_trans_pointer_assign_need_temp (gfc_
       rse.want_pointer = 1;
       gfc_conv_expr (&rse, expr2);
       gfc_add_block_to_block (&body, &rse.pre);
-      gfc_add_modify_expr (&body, lse.expr,
+      gfc_add_modify (&body, lse.expr,
 			   fold_convert (TREE_TYPE (lse.expr), rse.expr));
       gfc_add_block_to_block (&body, &rse.post);
 
       /* Increment count.  */
       tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
 			 count, gfc_index_one_node);
-      gfc_add_modify_expr (&body, count, tmp);
+      gfc_add_modify (&body, count, tmp);
 
       tmp = gfc_finish_block (&body);
 
@@ -2506,7 +2506,7 @@ gfc_trans_pointer_assign_need_temp (gfc_
       gfc_add_expr_to_block (block, tmp);
 
       /* Reset count.  */
-      gfc_add_modify_expr (block, count, gfc_index_zero_node);
+      gfc_add_modify (block, count, gfc_index_zero_node);
 
       gfc_start_block (&body);
       gfc_init_se (&lse, NULL);
@@ -2515,12 +2515,12 @@ gfc_trans_pointer_assign_need_temp (gfc_
       lse.want_pointer = 1;
       gfc_conv_expr (&lse, expr1);
       gfc_add_block_to_block (&body, &lse.pre);
-      gfc_add_modify_expr (&body, lse.expr, rse.expr);
+      gfc_add_modify (&body, lse.expr, rse.expr);
       gfc_add_block_to_block (&body, &lse.post);
       /* Increment count.  */
       tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
 			 count, gfc_index_one_node);
-      gfc_add_modify_expr (&body, count, tmp);
+      gfc_add_modify (&body, count, tmp);
       tmp = gfc_finish_block (&body);
 
       /* Generate body and loops according to the information in
@@ -2565,7 +2565,7 @@ gfc_trans_pointer_assign_need_temp (gfc_
       /* Increment count.  */
       tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
 			 count, gfc_index_one_node);
-      gfc_add_modify_expr (&body, count, tmp);
+      gfc_add_modify (&body, count, tmp);
 
       tmp = gfc_finish_block (&body);
 
@@ -2575,13 +2575,13 @@ gfc_trans_pointer_assign_need_temp (gfc_
       gfc_add_expr_to_block (block, tmp);
 
       /* Reset count.  */
-      gfc_add_modify_expr (block, count, gfc_index_zero_node);
+      gfc_add_modify (block, count, gfc_index_zero_node);
 
       parm = gfc_build_array_ref (tmp1, count, NULL);
       lss = gfc_walk_expr (expr1);
       gfc_init_se (&lse, NULL);
       gfc_conv_expr_descriptor (&lse, expr1, lss);
-      gfc_add_modify_expr (&lse.pre, lse.expr, parm);
+      gfc_add_modify (&lse.pre, lse.expr, parm);
       gfc_start_block (&body);
       gfc_add_block_to_block (&body, &lse.pre);
       gfc_add_block_to_block (&body, &lse.post);
@@ -2589,7 +2589,7 @@ gfc_trans_pointer_assign_need_temp (gfc_
       /* Increment count.  */
       tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
 			 count, gfc_index_one_node);
-      gfc_add_modify_expr (&body, count, tmp);
+      gfc_add_modify (&body, count, tmp);
 
       tmp = gfc_finish_block (&body);
 
@@ -2821,7 +2821,7 @@ gfc_trans_forall_1 (gfc_code * code, for
       /* As the mask array can be very big, prefer compact boolean types.  */
       tree mask_type = gfc_get_logical_type (gfc_logical_kinds[0].kind);
 
-      gfc_add_modify_expr (&block, maskindex, gfc_index_zero_node);
+      gfc_add_modify (&block, maskindex, gfc_index_zero_node);
 
       /* Start of mask assignment loop body.  */
       gfc_start_block (&body);
@@ -2835,12 +2835,12 @@ gfc_trans_forall_1 (gfc_code * code, for
       se.expr = convert (mask_type, se.expr);
 
       tmp = gfc_build_array_ref (mask, maskindex, NULL);
-      gfc_add_modify_expr (&body, tmp, se.expr);
+      gfc_add_modify (&body, tmp, se.expr);
 
       /* Advance to the next mask element.  */
       tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
 			 maskindex, gfc_index_one_node);
-      gfc_add_modify_expr (&body, maskindex, tmp);
+      gfc_add_modify (&body, maskindex, tmp);
 
       /* Generate the loops.  */
       tmp = gfc_finish_block (&body);
@@ -2998,7 +2998,7 @@ gfc_evaluate_where_mask (gfc_expr * me, 
   /* Variable to index the temporary.  */
   count = gfc_create_var (gfc_array_index_type, "count");
   /* Initialize count.  */
-  gfc_add_modify_expr (block, count, gfc_index_zero_node);
+  gfc_add_modify (block, count, gfc_index_zero_node);
 
   gfc_start_block (&body);
 
@@ -3040,14 +3040,14 @@ gfc_evaluate_where_mask (gfc_expr * me, 
   gfc_add_block_to_block (&body1, &lse.pre);
   gfc_add_block_to_block (&body1, &rse.pre);
 
-  gfc_add_modify_expr (&body1, cond, fold_convert (mask_type, rse.expr));
+  gfc_add_modify (&body1, cond, fold_convert (mask_type, rse.expr));
 
   if (mask && (cmask || pmask))
     {
       tmp = gfc_build_array_ref (mask, count, NULL);
       if (invert)
 	tmp = fold_build1 (TRUTH_NOT_EXPR, mask_type, tmp);
-      gfc_add_modify_expr (&body1, mtmp, tmp);
+      gfc_add_modify (&body1, mtmp, tmp);
     }
 
   if (cmask)
@@ -3056,7 +3056,7 @@ gfc_evaluate_where_mask (gfc_expr * me, 
       tmp = cond;
       if (mask)
 	tmp = fold_build2 (TRUTH_AND_EXPR, mask_type, mtmp, tmp);
-      gfc_add_modify_expr (&body1, tmp1, tmp);
+      gfc_add_modify (&body1, tmp1, tmp);
     }
 
   if (pmask)
@@ -3065,7 +3065,7 @@ gfc_evaluate_where_mask (gfc_expr * me, 
       tmp = fold_build1 (TRUTH_NOT_EXPR, mask_type, cond);
       if (mask)
 	tmp = fold_build2 (TRUTH_AND_EXPR, mask_type, mtmp, tmp);
-      gfc_add_modify_expr (&body1, tmp1, tmp);
+      gfc_add_modify (&body1, tmp1, tmp);
     }
 
   gfc_add_block_to_block (&body1, &lse.post);
@@ -3080,7 +3080,7 @@ gfc_evaluate_where_mask (gfc_expr * me, 
       /* Increment count.  */
       tmp1 = fold_build2 (PLUS_EXPR, gfc_array_index_type, count,
                           gfc_index_one_node);
-      gfc_add_modify_expr (&body1, count, tmp1);
+      gfc_add_modify (&body1, count, tmp1);
 
       /* Generate the copying loops.  */
       gfc_trans_scalarizing_loops (&loop, &body1);
@@ -3241,7 +3241,7 @@ gfc_trans_where_assign (gfc_expr *expr1,
       /* Increment count1.  */
       tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
 			 count1, gfc_index_one_node);
-      gfc_add_modify_expr (&body, count1, tmp);
+      gfc_add_modify (&body, count1, tmp);
 
       /* Use the scalar assignment as is.  */
       gfc_add_block_to_block (&block, &body);
@@ -3257,7 +3257,7 @@ gfc_trans_where_assign (gfc_expr *expr1,
              expression.  */
           tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
 			     count1, gfc_index_one_node);
-          gfc_add_modify_expr (&body, count1, tmp);
+          gfc_add_modify (&body, count1, tmp);
           gfc_trans_scalarized_loop_boundary (&loop, &body);
 
           /* We need to copy the temporary to the actual lhs.  */
@@ -3291,14 +3291,14 @@ gfc_trans_where_assign (gfc_expr *expr1,
           /* Increment count2.  */
           tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
 			     count2, gfc_index_one_node);
-          gfc_add_modify_expr (&body, count2, tmp);
+          gfc_add_modify (&body, count2, tmp);
         }
       else
         {
           /* Increment count1.  */
           tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
 			     count1, gfc_index_one_node);
-          gfc_add_modify_expr (&body, count1, tmp);
+          gfc_add_modify (&body, count1, tmp);
         }
 
       /* Generate the copying loops.  */
@@ -3491,8 +3491,8 @@ gfc_trans_where_2 (gfc_code * code, tree
                       /* Variables to control maskexpr.  */
                       count1 = gfc_create_var (gfc_array_index_type, "count1");
                       count2 = gfc_create_var (gfc_array_index_type, "count2");
-                      gfc_add_modify_expr (block, count1, gfc_index_zero_node);
-                      gfc_add_modify_expr (block, count2, gfc_index_zero_node);
+                      gfc_add_modify (block, count1, gfc_index_zero_node);
+                      gfc_add_modify (block, count2, gfc_index_zero_node);
 
                       tmp = gfc_trans_where_assign (expr1, expr2,
 						    cmask, invert,
@@ -3509,8 +3509,8 @@ gfc_trans_where_2 (gfc_code * code, tree
                   /* Variables to control maskexpr.  */
                   count1 = gfc_create_var (gfc_array_index_type, "count1");
                   count2 = gfc_create_var (gfc_array_index_type, "count2");
-                  gfc_add_modify_expr (block, count1, gfc_index_zero_node);
-                  gfc_add_modify_expr (block, count2, gfc_index_zero_node);
+                  gfc_add_modify (block, count1, gfc_index_zero_node);
+                  gfc_add_modify (block, count2, gfc_index_zero_node);
 
                   tmp = gfc_trans_where_assign (expr1, expr2,
 						cmask, invert,
@@ -3892,7 +3892,7 @@ gfc_trans_allocate (gfc_code * code)
       gfc_init_se (&se, NULL);
       gfc_conv_expr_lhs (&se, code->expr);
       tmp = convert (TREE_TYPE (se.expr), stat);
-      gfc_add_modify_expr (&block, se.expr, tmp);
+      gfc_add_modify (&block, se.expr, tmp);
     }
 
   return gfc_finish_block (&block);
@@ -3941,7 +3941,7 @@ gfc_trans_deallocate (gfc_code * code)
       apstat = build_fold_addr_expr (astat);
 
       /* Initialize astat to 0.  */
-      gfc_add_modify_expr (&block, astat, build_int_cst (TREE_TYPE (astat), 0));
+      gfc_add_modify (&block, astat, build_int_cst (TREE_TYPE (astat), 0));
     }
   else
     pstat = apstat = stat = astat = NULL_TREE;
@@ -3996,7 +3996,7 @@ gfc_trans_deallocate (gfc_code * code)
       if (code->expr)
 	{
 	  apstat = fold_build2 (PLUS_EXPR, TREE_TYPE (stat), astat, stat);
-	  gfc_add_modify_expr (&se.pre, astat, apstat);
+	  gfc_add_modify (&se.pre, astat, apstat);
 	}
 
       tmp = gfc_finish_block (&se.pre);
@@ -4010,7 +4010,7 @@ gfc_trans_deallocate (gfc_code * code)
       gfc_init_se (&se, NULL);
       gfc_conv_expr_lhs (&se, code->expr);
       tmp = convert (TREE_TYPE (se.expr), astat);
-      gfc_add_modify_expr (&block, se.expr, tmp);
+      gfc_add_modify (&block, se.expr, tmp);
     }
 
   return gfc_finish_block (&block);
Index: fortran/trans.c
===================================================================
--- fortran/trans.c	(revision 137784)
+++ fortran/trans.c	(working copy)
@@ -142,19 +142,18 @@ gfc_evaluate_now (tree expr, stmtblock_t
     return expr;
 
   var = gfc_create_var (TREE_TYPE (expr), NULL);
-  gfc_add_modify_expr (pblock, var, expr);
+  gfc_add_modify (pblock, var, expr);
 
   return var;
 }
 
 
-/* Build a MODIFY_EXPR (or GIMPLE_MODIFY_STMT) node and add it to a
-   given statement block PBLOCK.  A MODIFY_EXPR is an assignment:
+/* Build a MODIFY_EXPR node and add it to a given statement block PBLOCK.  
+   A MODIFY_EXPR is an assignment:
    LHS <- RHS.  */
 
 void
-gfc_add_modify (stmtblock_t * pblock, tree lhs, tree rhs,
-		bool tuples_p)
+gfc_add_modify (stmtblock_t * pblock, tree lhs, tree rhs)
 {
   tree tmp;
 
@@ -167,8 +166,7 @@ gfc_add_modify (stmtblock_t * pblock, tr
 	      || AGGREGATE_TYPE_P (TREE_TYPE (lhs)));
 #endif
 
-  tmp = fold_build2 (tuples_p ? GIMPLE_MODIFY_STMT : MODIFY_EXPR,
-		     void_type_node, lhs, rhs);
+  tmp = fold_build2 (MODIFY_EXPR, void_type_node, lhs, rhs);
   gfc_add_expr_to_block (pblock, tmp);
 }
 
@@ -472,7 +470,7 @@ gfc_call_malloc (stmtblock_t * block, tr
   size = fold_build2 (MAX_EXPR, size_type_node, size,
 		      build_int_cst (size_type_node, 1));
 
-  gfc_add_modify_expr (&block2, res,
+  gfc_add_modify (&block2, res,
 		       build_call_expr (built_in_decls[BUILT_IN_MALLOC], 1,
 		       size));
   null_result = fold_build2 (EQ_EXPR, boolean_type_node, res,
@@ -570,10 +568,10 @@ gfc_allocate_with_status (stmtblock_t * 
       stmtblock_t set_status_block;
 
       gfc_start_block (&set_status_block);
-      gfc_add_modify_expr (&set_status_block,
+      gfc_add_modify (&set_status_block,
 			   fold_build1 (INDIRECT_REF, status_type, status),
 			   build_int_cst (status_type, LIBERROR_ALLOCATION));
-      gfc_add_modify_expr (&set_status_block, res,
+      gfc_add_modify (&set_status_block, res,
 			   build_int_cst (pvoid_type_node, 0));
 
       tmp = fold_build2 (EQ_EXPR, boolean_type_node, status,
@@ -584,7 +582,7 @@ gfc_allocate_with_status (stmtblock_t * 
 
   /* The allocation itself.  */
   gfc_start_block (&alloc_block);
-  gfc_add_modify_expr (&alloc_block, res,
+  gfc_add_modify (&alloc_block, res,
 		       build_call_expr (built_in_decls[BUILT_IN_MALLOC], 1,
 					fold_build2 (MAX_EXPR, size_type_node,
 						     size,
@@ -666,7 +664,7 @@ gfc_allocate_array_with_status (stmtbloc
   /* If mem is NULL, we call gfc_allocate_with_status.  */
   gfc_start_block (&alloc_block);
   tmp = gfc_allocate_with_status (&alloc_block, size, status);
-  gfc_add_modify_expr (&alloc_block, res, fold_convert (type, tmp));
+  gfc_add_modify (&alloc_block, res, fold_convert (type, tmp));
   alloc = gfc_finish_block (&alloc_block);
 
   /* Otherwise, we issue a runtime error or set the status variable.  */
@@ -685,9 +683,9 @@ gfc_allocate_array_with_status (stmtbloc
       gfc_add_expr_to_block (&set_status_block, tmp);
 
       tmp = gfc_allocate_with_status (&set_status_block, size, status);
-      gfc_add_modify_expr (&set_status_block, res, fold_convert (type, tmp));
+      gfc_add_modify (&set_status_block, res, fold_convert (type, tmp));
 
-      gfc_add_modify_expr (&set_status_block,
+      gfc_add_modify (&set_status_block,
 			   fold_build1 (INDIRECT_REF, status_type, status),
 			   build_int_cst (status_type, LIBERROR_ALLOCATION));
 
@@ -862,7 +860,7 @@ gfc_call_realloc (stmtblock_t * block, t
   /* Call realloc and check the result.  */
   tmp = build_call_expr (built_in_decls[BUILT_IN_REALLOC], 2,
 			 fold_convert (pvoid_type_node, mem), size);
-  gfc_add_modify_expr (block, res, fold_convert (type, tmp));
+  gfc_add_modify (block, res, fold_convert (type, tmp));
   null_result = fold_build2 (EQ_EXPR, boolean_type_node, res,
 			     build_int_cst (pvoid_type_node, 0));
   nonzero = fold_build2 (NE_EXPR, boolean_type_node, size,
Index: fortran/trans.h
===================================================================
--- fortran/trans.h	(revision 137784)
+++ fortran/trans.h	(working copy)
@@ -348,12 +348,8 @@ void gfc_trans_vla_type_sizes (gfc_symbo
 void gfc_add_expr_to_block (stmtblock_t *, tree);
 /* Add a block to the end of a block.  */
 void gfc_add_block_to_block (stmtblock_t *, stmtblock_t *);
-/* Add a MODIFY_EXPR or a GIMPLE_MODIFY_STMT to a block.  */
-void gfc_add_modify (stmtblock_t *, tree, tree, bool);
-#define gfc_add_modify_expr(BLOCK, LHS, RHS) \
-       gfc_add_modify ((BLOCK), (LHS), (RHS), false)
-#define gfc_add_modify_stmt(BLOCK, LHS, RHS) \
-       gfc_add_modify ((BLOCK), (LHS), (RHS), true)
+/* Add a MODIFY_EXPR to a block.  */
+void gfc_add_modify (stmtblock_t *, tree, tree);
 
 /* Initialize a statement block.  */
 void gfc_init_block (stmtblock_t *);
Index: fortran/f95-lang.c
===================================================================
--- fortran/f95-lang.c	(revision 137784)
+++ fortran/f95-lang.c	(working copy)
@@ -62,7 +62,7 @@ GTY(())
 
 union lang_tree_node
 GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"),
-     chain_next ("(union lang_tree_node *)GENERIC_NEXT (&%h.generic)")))
+     chain_next ("(union lang_tree_node *)TREE_CHAIN (&%h.generic)")))
 
 {
   union tree_node GTY((tag ("0"),
Index: fortran/trans-io.c
===================================================================
--- fortran/trans-io.c	(revision 137784)
+++ fortran/trans-io.c	(working copy)
@@ -450,7 +450,7 @@ set_parameter_const (stmtblock_t *block,
 		       var, TYPE_FIELDS (TREE_TYPE (var)), NULL_TREE);
   tmp = fold_build3 (COMPONENT_REF, TREE_TYPE (p->field), var, p->field,
 		     NULL_TREE);
-  gfc_add_modify_expr (block, tmp, build_int_cst (TREE_TYPE (p->field), val));
+  gfc_add_modify (block, tmp, build_int_cst (TREE_TYPE (p->field), val));
   return p->mask;
 }
 
@@ -505,7 +505,7 @@ set_parameter_value (stmtblock_t *block,
 		       var, TYPE_FIELDS (TREE_TYPE (var)), NULL_TREE);
 
   tmp = fold_build3 (COMPONENT_REF, dest_type, var, p->field, NULL_TREE);
-  gfc_add_modify_expr (block, tmp, se.expr);
+  gfc_add_modify (block, tmp, se.expr);
   return p->mask;
 }
 
@@ -535,7 +535,7 @@ set_parameter_ref (stmtblock_t *block, s
       /* If this is for the iostat variable initialize the
 	 user variable to LIBERROR_OK which is zero.  */
       if (type == IOPARM_common_iostat)
-	gfc_add_modify_expr (block, se.expr,
+	gfc_add_modify (block, se.expr,
 			     build_int_cst (TREE_TYPE (se.expr), LIBERROR_OK));
     }
   else
@@ -549,13 +549,13 @@ set_parameter_ref (stmtblock_t *block, s
       /* If this is for the iostat variable, initialize the
 	 user variable to LIBERROR_OK which is zero.  */
       if (type == IOPARM_common_iostat)
-	gfc_add_modify_expr (block, tmpvar,
+	gfc_add_modify (block, tmpvar,
 			     build_int_cst (TREE_TYPE (tmpvar), LIBERROR_OK));
 
       addr = build_fold_addr_expr (tmpvar);
 	/* After the I/O operation, we set the variable from the temporary.  */
       tmp = convert (TREE_TYPE (se.expr), tmpvar);
-      gfc_add_modify_expr (postblock, se.expr, tmp);
+      gfc_add_modify (postblock, se.expr, tmp);
      }
 
   if (p->param_type == IOPARM_ptype_common)
@@ -563,7 +563,7 @@ set_parameter_ref (stmtblock_t *block, s
 		       var, TYPE_FIELDS (TREE_TYPE (var)), NULL_TREE);
   tmp = fold_build3 (COMPONENT_REF, TREE_TYPE (p->field),
 		     var, p->field, NULL_TREE);
-  gfc_add_modify_expr (block, tmp, addr);
+  gfc_add_modify (block, tmp, addr);
   return p->mask;
 }
 
@@ -672,9 +672,9 @@ set_string (stmtblock_t * block, stmtblo
 			       fold_convert (long_integer_type_node, tmp));
       gfc_free (msg);
 
-      gfc_add_modify_expr (&se.pre, io,
+      gfc_add_modify (&se.pre, io,
 		 fold_convert (TREE_TYPE (io), GFC_DECL_ASSIGN_ADDR (se.expr)));
-      gfc_add_modify_expr (&se.pre, len, GFC_DECL_STRING_LEN (se.expr));
+      gfc_add_modify (&se.pre, len, GFC_DECL_STRING_LEN (se.expr));
     }
   else
     {
@@ -688,8 +688,8 @@ set_string (stmtblock_t * block, stmtblo
 	gcc_unreachable ();
 
       gfc_conv_string_parameter (&se);
-      gfc_add_modify_expr (&se.pre, io, fold_convert (TREE_TYPE (io), se.expr));
-      gfc_add_modify_expr (&se.pre, len, se.string_length);
+      gfc_add_modify (&se.pre, io, fold_convert (TREE_TYPE (io), se.expr));
+      gfc_add_modify (&se.pre, len, se.string_length);
     }
 
   gfc_add_block_to_block (block, &se.pre);
@@ -764,10 +764,10 @@ set_internal_unit (stmtblock_t * block, 
 
   /* The cast is needed for character substrings and the descriptor
      data.  */
-  gfc_add_modify_expr (&se.pre, io, fold_convert (TREE_TYPE (io), tmp));
-  gfc_add_modify_expr (&se.pre, len,
+  gfc_add_modify (&se.pre, io, fold_convert (TREE_TYPE (io), tmp));
+  gfc_add_modify (&se.pre, len,
 		       fold_convert (TREE_TYPE (len), se.string_length));
-  gfc_add_modify_expr (&se.pre, desc, se.expr);
+  gfc_add_modify (&se.pre, desc, se.expr);
 
   gfc_add_block_to_block (block, &se.pre);
   gfc_add_block_to_block (post_block, &se.post);
@@ -865,7 +865,7 @@ set_error_locus (stmtblock_t * block, tr
   str = gfc_build_cstring_const (f->filename);
 
   str = gfc_build_addr_expr (pchar_type_node, str);
-  gfc_add_modify_expr (block, locus_file, str);
+  gfc_add_modify (block, locus_file, str);
 
   line = LOCATION_LINE (where->lb->location);
   set_parameter_const (block, var, IOPARM_common_line, line);
Index: fortran/trans-decl.c
===================================================================
--- fortran/trans-decl.c	(revision 137784)
+++ fortran/trans-decl.c	(working copy)
@@ -2571,7 +2571,7 @@ gfc_trans_assign_aux_var (gfc_symbol * s
 
   /* Set the initial value to length. See the comments in
      function gfc_add_assign_aux_vars in this file.  */
-  gfc_add_modify_expr (&body, GFC_DECL_STRING_LEN (sym->backend_decl),
+  gfc_add_modify (&body, GFC_DECL_STRING_LEN (sym->backend_decl),
 		       build_int_cst (NULL_TREE, -2));
 
   gfc_add_expr_to_block (&body, fnbody);
@@ -2602,7 +2602,7 @@ gfc_trans_vla_one_sizepos (tree *tp, stm
 
   var = gfc_create_var_np (TREE_TYPE (t), NULL);
   gfc_add_decl_to_function (var);
-  gfc_add_modify_expr (body, var, val);
+  gfc_add_modify (body, var, val);
   if (TREE_CODE (t) == SAVE_EXPR)
     TREE_OPERAND (t, 0) = var;
   *tp = var;
@@ -3407,7 +3407,7 @@ gfc_generate_function_code (gfc_namespac
     {
       tree alternate_return;
       alternate_return = gfc_get_fake_result_decl (sym, 0);
-      gfc_add_modify_expr (&body, alternate_return, integer_zero_node);
+      gfc_add_modify (&body, alternate_return, integer_zero_node);
     }
 
   if (ns->entries)
Index: fortran/trans-intrinsic.c
===================================================================
--- fortran/trans-intrinsic.c	(revision 137784)
+++ fortran/trans-intrinsic.c	(working copy)
@@ -1315,7 +1315,7 @@ gfc_conv_intrinsic_char (gfc_se * se, gf
   var = gfc_create_var (type, "char");
 
   arg[0] = fold_build1 (NOP_EXPR, type, arg[0]);
-  gfc_add_modify_expr (&se->pre, var, arg[0]);
+  gfc_add_modify (&se->pre, var, arg[0]);
   se->expr = gfc_build_addr_expr (build_pointer_type (type), var);
   se->string_length = integer_one_node;
 }
@@ -1478,7 +1478,7 @@ gfc_conv_intrinsic_minmax (gfc_se * se, 
     args[0] = gfc_evaluate_now (args[0], &se->pre);
 
   mvar = gfc_create_var (type, "M");
-  gfc_add_modify_expr (&se->pre, mvar, args[0]);
+  gfc_add_modify (&se->pre, mvar, args[0]);
   for (i = 1, argexpr = argexpr->next; i < nargs; i++)
     {
       tree cond, isnan;
@@ -1717,7 +1717,7 @@ gfc_conv_intrinsic_anyall (gfc_se * se, 
     tmp = convert (type, boolean_true_node);
   else
     tmp = convert (type, boolean_false_node);
-  gfc_add_modify_expr (&se->pre, resvar, tmp);
+  gfc_add_modify (&se->pre, resvar, tmp);
 
   /* Walk the arguments.  */
   arrayss = gfc_walk_expr (actual->expr);
@@ -1743,7 +1743,7 @@ gfc_conv_intrinsic_anyall (gfc_se * se, 
     tmp = convert (type, boolean_false_node);
   else
     tmp = convert (type, boolean_true_node);
-  gfc_add_modify_expr (&block, resvar, tmp);
+  gfc_add_modify (&block, resvar, tmp);
 
   /* And break out of the loop.  */
   tmp = build1_v (GOTO_EXPR, exit_label);
@@ -1801,7 +1801,7 @@ gfc_conv_intrinsic_count (gfc_se * se, g
   type = gfc_typenode_for_spec (&expr->ts);
   /* Initialize the result.  */
   resvar = gfc_create_var (type, "count");
-  gfc_add_modify_expr (&se->pre, resvar, build_int_cst (type, 0));
+  gfc_add_modify (&se->pre, resvar, build_int_cst (type, 0));
 
   /* Walk the arguments.  */
   arrayss = gfc_walk_expr (actual->expr);
@@ -1874,7 +1874,7 @@ gfc_conv_intrinsic_arith (gfc_se * se, g
   else
     tmp = gfc_build_const (type, integer_one_node);
 
-  gfc_add_modify_expr (&se->pre, resvar, tmp);
+  gfc_add_modify (&se->pre, resvar, tmp);
 
   /* Walk the arguments.  */
   actual = expr->value.function.actual;
@@ -1931,7 +1931,7 @@ gfc_conv_intrinsic_arith (gfc_se * se, g
   gfc_add_block_to_block (&block, &arrayse.pre);
 
   tmp = fold_build2 (op, type, resvar, arrayse.expr);
-  gfc_add_modify_expr (&block, resvar, tmp);
+  gfc_add_modify (&block, resvar, tmp);
   gfc_add_block_to_block (&block, &arrayse.post);
 
   if (maskss)
@@ -1998,7 +1998,7 @@ gfc_conv_intrinsic_dot_product (gfc_se *
   else
     tmp = gfc_build_const (type, integer_zero_node);
 
-  gfc_add_modify_expr (&se->pre, resvar, tmp);
+  gfc_add_modify (&se->pre, resvar, tmp);
 
   /* Walk argument #1.  */
   actual = expr->value.function.actual;
@@ -2055,7 +2055,7 @@ gfc_conv_intrinsic_dot_product (gfc_se *
       tmp = fold_build2 (MULT_EXPR, type, arrayse1.expr, arrayse2.expr);
       tmp = fold_build2 (PLUS_EXPR, type, resvar, tmp);
     }
-  gfc_add_modify_expr (&block, resvar, tmp);
+  gfc_add_modify (&block, resvar, tmp);
 
   /* Finish up the loop block and the loop.  */
   tmp = gfc_finish_block (&block);
@@ -2145,7 +2145,7 @@ gfc_conv_intrinsic_minmaxloc (gfc_se * s
      possible value is HUGE in both cases.  */
   if (op == GT_EXPR)
     tmp = fold_build1 (NEGATE_EXPR, TREE_TYPE (tmp), tmp);
-  gfc_add_modify_expr (&se->pre, limit, tmp);
+  gfc_add_modify (&se->pre, limit, tmp);
 
   if (op == GT_EXPR && expr->ts.type == BT_INTEGER)
     tmp = fold_build2 (MINUS_EXPR, TREE_TYPE (tmp), tmp,
@@ -2166,7 +2166,7 @@ gfc_conv_intrinsic_minmaxloc (gfc_se * s
   /* Initialize the position to zero, following Fortran 2003.  We are free
      to do this because Fortran 95 allows the result of an entirely false
      mask to be processor dependent.  */
-  gfc_add_modify_expr (&loop.pre, pos, gfc_index_zero_node);
+  gfc_add_modify (&loop.pre, pos, gfc_index_zero_node);
 
   gfc_mark_ss_chain_used (arrayss, 1);
   if (maskss)
@@ -2199,7 +2199,7 @@ gfc_conv_intrinsic_minmaxloc (gfc_se * s
   gfc_start_block (&ifblock);
 
   /* Assign the value to the limit...  */
-  gfc_add_modify_expr (&ifblock, limit, arrayse.expr);
+  gfc_add_modify (&ifblock, limit, arrayse.expr);
 
   /* Remember where we are.  An offset must be added to the loop
      counter to obtain the required position.  */
@@ -2209,11 +2209,11 @@ gfc_conv_intrinsic_minmaxloc (gfc_se * s
   else
     tmp = build_int_cst (gfc_array_index_type, 1);
   
-  gfc_add_modify_expr (&block, offset, tmp);
+  gfc_add_modify (&block, offset, tmp);
 
   tmp = fold_build2 (PLUS_EXPR, TREE_TYPE (pos),
 		     loop.loopvar[0], offset);
-  gfc_add_modify_expr (&ifblock, pos, tmp);
+  gfc_add_modify (&ifblock, pos, tmp);
 
   ifbody = gfc_finish_block (&ifblock);
 
@@ -2257,7 +2257,7 @@ gfc_conv_intrinsic_minmaxloc (gfc_se * s
 	 the pos variable the same way as above.  */
 
       gfc_init_block (&elseblock);
-      gfc_add_modify_expr (&elseblock, pos, gfc_index_zero_node);
+      gfc_add_modify (&elseblock, pos, gfc_index_zero_node);
       elsetmp = gfc_finish_block (&elseblock);
 
       tmp = build3_v (COND_EXPR, maskse.expr, tmp, elsetmp);
@@ -2328,7 +2328,7 @@ gfc_conv_intrinsic_minmaxval (gfc_se * s
     tmp = fold_build2 (MINUS_EXPR, TREE_TYPE (tmp),
 		       tmp, build_int_cst (type, 1));
 
-  gfc_add_modify_expr (&se->pre, limit, tmp);
+  gfc_add_modify (&se->pre, limit, tmp);
 
   /* Walk the arguments.  */
   actual = expr->value.function.actual;
@@ -3002,12 +3002,12 @@ gfc_conv_intrinsic_spacing (gfc_se * se,
   gfc_add_expr_to_block (&block, tmp);
 
   tmp = fold_build2 (MINUS_EXPR, integer_type_node, e, prec);
-  gfc_add_modify_expr (&block, e, fold_build2 (MAX_EXPR, integer_type_node,
+  gfc_add_modify (&block, e, fold_build2 (MAX_EXPR, integer_type_node,
 					       tmp, emin));
 
   tmp = build_call_expr (built_in_decls[scalbn], 2,
 			 build_real_from_int_cst (type, integer_one_node), e);
-  gfc_add_modify_expr (&block, res, tmp);
+  gfc_add_modify (&block, res, tmp);
 
   /* Finish by building the IF statement.  */
   cond = fold_build2 (EQ_EXPR, boolean_type_node, arg,
@@ -3070,7 +3070,7 @@ gfc_conv_intrinsic_rrspacing (gfc_se * s
 
   e = gfc_create_var (integer_type_node, NULL);
   x = gfc_create_var (type, NULL);
-  gfc_add_modify_expr (&se->pre, x,
+  gfc_add_modify (&se->pre, x,
 		       build_call_expr (built_in_decls[fabs], 1, arg));
 
 
@@ -3082,7 +3082,7 @@ gfc_conv_intrinsic_rrspacing (gfc_se * s
   tmp = fold_build2 (MINUS_EXPR, integer_type_node,
 		     build_int_cst (NULL_TREE, prec), e);
   tmp = build_call_expr (built_in_decls[scalbn], 2, x, tmp);
-  gfc_add_modify_expr (&block, x, tmp);
+  gfc_add_modify (&block, x, tmp);
   stmt = gfc_finish_block (&block);
 
   cond = fold_build2 (NE_EXPR, boolean_type_node, x,
@@ -3299,7 +3299,7 @@ gfc_conv_intrinsic_sizeof (gfc_se *se, g
       else
 	tmp = fold_convert (gfc_array_index_type,
 			    size_in_bytes (type)); 
-      gfc_add_modify_expr (&argse.pre, source_bytes, tmp);
+      gfc_add_modify (&argse.pre, source_bytes, tmp);
 
       /* Obtain the size of the array in bytes.  */
       for (n = 0; n < arg->rank; n++)
@@ -3314,7 +3314,7 @@ gfc_conv_intrinsic_sizeof (gfc_se *se, g
 			     tmp, gfc_index_one_node);
 	  tmp = fold_build2 (MULT_EXPR, gfc_array_index_type,
 			     tmp, source_bytes);
-	  gfc_add_modify_expr (&argse.pre, source_bytes, tmp);
+	  gfc_add_modify (&argse.pre, source_bytes, tmp);
 	}
       se->expr = source_bytes;
     }
@@ -3468,13 +3468,13 @@ gfc_conv_intrinsic_array_transfer (gfc_s
 	{
 	  tree idx;
 	  idx = gfc_rank_cst[n];
-	  gfc_add_modify_expr (&argse.pre, source_bytes, tmp);
+	  gfc_add_modify (&argse.pre, source_bytes, tmp);
 	  stride = gfc_conv_descriptor_stride (argse.expr, idx);
 	  lower = gfc_conv_descriptor_lbound (argse.expr, idx);
 	  upper = gfc_conv_descriptor_ubound (argse.expr, idx);
 	  tmp = fold_build2 (MINUS_EXPR, gfc_array_index_type,
 			     upper, lower);
-	  gfc_add_modify_expr (&argse.pre, extent, tmp);
+	  gfc_add_modify (&argse.pre, extent, tmp);
 	  tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
 			     extent, gfc_index_one_node);
 	  tmp = fold_build2 (MULT_EXPR, gfc_array_index_type,
@@ -3482,7 +3482,7 @@ gfc_conv_intrinsic_array_transfer (gfc_s
 	}
     }
 
-  gfc_add_modify_expr (&argse.pre, source_bytes, tmp);
+  gfc_add_modify (&argse.pre, source_bytes, tmp);
   gfc_add_block_to_block (&se->pre, &argse.pre);
   gfc_add_block_to_block (&se->post, &argse.post);
 
@@ -3517,7 +3517,7 @@ gfc_conv_intrinsic_array_transfer (gfc_s
 			size_in_bytes (mold_type)); 
  
   dest_word_len = gfc_create_var (gfc_array_index_type, NULL);
-  gfc_add_modify_expr (&se->pre, dest_word_len, tmp);
+  gfc_add_modify (&se->pre, dest_word_len, tmp);
 
   /* Finally convert SIZE, if it is present.  */
   arg = arg->next;
@@ -3546,8 +3546,8 @@ gfc_conv_intrinsic_array_transfer (gfc_s
   else
     tmp = source_bytes;
 
-  gfc_add_modify_expr (&se->pre, size_bytes, tmp);
-  gfc_add_modify_expr (&se->pre, size_words,
+  gfc_add_modify (&se->pre, size_bytes, tmp);
+  gfc_add_modify (&se->pre, size_words,
 		       fold_build2 (CEIL_DIV_EXPR, gfc_array_index_type,
 				    size_bytes, dest_word_len));
 
@@ -3564,8 +3564,8 @@ gfc_conv_intrinsic_array_transfer (gfc_s
 			 tmp, gfc_index_one_node);
       tmp = fold_build2 (MIN_EXPR, gfc_array_index_type,
 			 tmp, size_words);
-      gfc_add_modify_expr (&se->pre, size_words, tmp);
-      gfc_add_modify_expr (&se->pre, size_bytes,
+      gfc_add_modify (&se->pre, size_words, tmp);
+      gfc_add_modify (&se->pre, size_bytes,
 			   fold_build2 (MULT_EXPR, gfc_array_index_type,
 					size_words, dest_word_len));
       upper = fold_build2 (PLUS_EXPR, gfc_array_index_type,
@@ -3965,7 +3965,7 @@ gfc_conv_intrinsic_repeat (gfc_se * se, 
 		      build_int_cst (size_type_node, 0));
   tmp = fold_build3 (COND_EXPR, ncopies_type, cond,
 		     build_int_cst (ncopies_type, 0), ncopies);
-  gfc_add_modify_expr (&se->pre, n, tmp);
+  gfc_add_modify (&se->pre, n, tmp);
   ncopies = n;
 
   /* Check that ncopies is not too large: ncopies should be less than
@@ -4000,7 +4000,7 @@ gfc_conv_intrinsic_repeat (gfc_se * se, 
          memmove (dest + (i * slen * size), src, slen*size);  */
   gfc_start_block (&block);
   count = gfc_create_var (ncopies_type, "count");
-  gfc_add_modify_expr (&block, count, build_int_cst (ncopies_type, 0));
+  gfc_add_modify (&block, count, build_int_cst (ncopies_type, 0));
   exit_label = gfc_build_label_decl (NULL_TREE);
 
   /* Start the loop body.  */
@@ -4031,7 +4031,7 @@ gfc_conv_intrinsic_repeat (gfc_se * se, 
   /* Increment count.  */
   tmp = fold_build2 (PLUS_EXPR, ncopies_type,
 		     count, build_int_cst (TREE_TYPE (count), 1));
-  gfc_add_modify_expr (&body, count, tmp);
+  gfc_add_modify (&body, count, tmp);
 
   /* Build the loop.  */
   tmp = build1_v (LOOP_EXPR, gfc_finish_block (&body));
@@ -4095,7 +4095,7 @@ gfc_conv_intrinsic_loc (gfc_se * se, gfc
   /* Create a temporary variable for loc return value.  Without this, 
      we get an error an ICE in gcc/expr.c(expand_expr_addr_expr_1).  */
   temp_var = gfc_create_var (gfc_get_int_type (gfc_index_integer_kind), NULL);
-  gfc_add_modify_expr (&se->pre, temp_var, se->expr);
+  gfc_add_modify (&se->pre, temp_var, se->expr);
   se->expr = temp_var;
 }
 
Index: c-pretty-print.c
===================================================================
--- c-pretty-print.c	(revision 137784)
+++ c-pretty-print.c	(working copy)
@@ -1852,14 +1852,13 @@ static void
 pp_c_assignment_expression (c_pretty_printer *pp, tree e)
 {
   if (TREE_CODE (e) == MODIFY_EXPR 
-      || TREE_CODE (e) == GIMPLE_MODIFY_STMT
       || TREE_CODE (e) == INIT_EXPR)
     {
-      pp_c_unary_expression (pp, GENERIC_TREE_OPERAND (e, 0));
+      pp_c_unary_expression (pp, TREE_OPERAND (e, 0));
       pp_c_whitespace (pp);
       pp_equal (pp);
       pp_space (pp);
-      pp_c_expression (pp, GENERIC_TREE_OPERAND (e, 1));
+      pp_c_expression (pp, TREE_OPERAND (e, 1));
     }
   else
     pp_c_conditional_expression (pp, e);
@@ -2007,7 +2006,6 @@ pp_c_expression (c_pretty_printer *pp, t
       break;
 
     case MODIFY_EXPR:
-    case GIMPLE_MODIFY_STMT:
     case INIT_EXPR:
       pp_assignment_expression (pp, e);
       break;
Index: function.c
===================================================================
--- function.c	(revision 137784)
+++ function.c	(working copy)
@@ -1547,7 +1547,7 @@ static tree
 instantiate_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
 {
   tree t = *tp;
-  if (! EXPR_P (t) && ! GIMPLE_STMT_P (t))
+  if (! EXPR_P (t))
     {
       *walk_subtrees = 0;
       if (DECL_P (t) && DECL_RTL_SET_P (t))
@@ -3170,12 +3170,11 @@ gimplify_parameters (void)
 		  t = built_in_decls[BUILT_IN_ALLOCA];
 		  t = build_call_expr (t, 1, DECL_SIZE_UNIT (parm));
 		  t = fold_convert (ptr_type, t);
-		  t = build_gimple_modify_stmt (addr, t);
+		  t = build2 (MODIFY_EXPR, TREE_TYPE (addr), addr, t);
 		  gimplify_and_add (t, &stmts);
 		}
 
-	      t = build_gimple_modify_stmt (local, parm);
-	      gimplify_and_add (t, &stmts);
+	      gimplify_assign (local, parm, &stmts);
 
 	      SET_DECL_VALUE_EXPR (parm, local);
 	      DECL_HAS_VALUE_EXPR_P (parm) = 1;
Index: langhooks.c
===================================================================
--- langhooks.c	(revision 137784)
+++ langhooks.c	(working copy)
@@ -524,7 +524,7 @@ lhd_omp_predetermined_sharing (tree decl
 tree
 lhd_omp_assignment (tree clause ATTRIBUTE_UNUSED, tree dst, tree src)
 {
-  return build_gimple_modify_stmt (dst, src);
+  return build2 (MODIFY_EXPR, TREE_TYPE (dst), dst, src);
 }
 
 /* Register language specific type size variables as potentially OpenMP
Index: tree-affine.c
===================================================================
--- tree-affine.c	(revision 137784)
+++ tree-affine.c	(working copy)
@@ -594,11 +594,11 @@ aff_combination_expand (aff_tree *comb A
       if (TREE_CODE (name) != SSA_NAME)
 	continue;
       def = SSA_NAME_DEF_STMT (name);
-      if (TREE_CODE (def) != GIMPLE_MODIFY_STMT
-	  || GIMPLE_STMT_OPERAND (def, 0) != name)
+      if (TREE_CODE (def) != MODIFY_EXPR
+	  || TREE_OPERAND (def, 0) != name)
 	continue;
 
-      rhs = GIMPLE_STMT_OPERAND (def, 1);
+      rhs = TREE_OPERAND (def, 1);
       if (TREE_CODE (rhs) != SSA_NAME
 	  && !EXPR_P (rhs)
 	  && !is_gimple_min_invariant (rhs))
Index: gimplify.c
===================================================================
--- gimplify.c	(revision 137784)
+++ gimplify.c	(working copy)
@@ -1139,9 +1139,8 @@ voidify_wrapper_expr (tree wrapper, tree
 	  /* The wrapper is on the RHS of an assignment that we're pushing
 	     down.  */
 	  gcc_assert (TREE_CODE (temp) == INIT_EXPR
-		      || TREE_CODE (temp) == GIMPLE_MODIFY_STMT
 		      || TREE_CODE (temp) == MODIFY_EXPR);
-	  GENERIC_TREE_OPERAND (temp, 1) = *p;
+	  TREE_OPERAND (temp, 1) = *p;
 	  *p = temp;
 	}
       else
@@ -1290,14 +1289,13 @@ gimplify_return_expr (tree stmt, gimple_
     result_decl = NULL_TREE;
   else
     {
-      result_decl = GENERIC_TREE_OPERAND (ret_expr, 0);
+      result_decl = TREE_OPERAND (ret_expr, 0);
 
       /* See through a return by reference.  */
       if (TREE_CODE (result_decl) == INDIRECT_REF)
 	result_decl = TREE_OPERAND (result_decl, 0);
 
       gcc_assert ((TREE_CODE (ret_expr) == MODIFY_EXPR
-	    	   || TREE_CODE (ret_expr) == GIMPLE_MODIFY_STMT
 		   || TREE_CODE (ret_expr) == INIT_EXPR)
 		  && TREE_CODE (result_decl) == RESULT_DECL);
     }
@@ -1331,10 +1329,10 @@ gimplify_return_expr (tree stmt, gimple_
       gimplify_ctxp->return_temp = result;
     }
 
-  /* Smash the lhs of the GIMPLE_MODIFY_STMT to the temporary we plan to use.
+  /* Smash the lhs of the MODIFY_EXPR to the temporary we plan to use.
      Then gimplify the whole thing.  */
   if (result != result_decl)
-    GENERIC_TREE_OPERAND (ret_expr, 0) = result;
+    TREE_OPERAND (ret_expr, 0) = result;
 
   gimplify_and_add (TREE_OPERAND (stmt, 0), pre_p);
 
@@ -1371,7 +1369,7 @@ gimplify_vla_decl (tree decl, gimple_seq
   t = built_in_decls[BUILT_IN_ALLOCA];
   t = build_call_expr (t, 1, DECL_SIZE_UNIT (decl));
   t = fold_convert (ptr_type, t);
-  t = build_gimple_modify_stmt (addr, t);
+  t = build2 (MODIFY_EXPR, TREE_TYPE (addr), addr, t);
 
   gimplify_and_add (t, seq_p);
 
@@ -2143,18 +2141,17 @@ gimplify_self_mod_expr (tree *expr_p, gi
     }
 
   t1 = build2 (arith_code, TREE_TYPE (*expr_p), lhs, rhs);
-  t1 = build_gimple_modify_stmt (lvalue, t1);
 
   if (postfix)
     {
-      gimplify_and_add (t1, orig_post_p);
+      gimplify_assign (lvalue, t1, orig_post_p);
       gimplify_seq_add_seq (orig_post_p, post);
       *expr_p = lhs;
       return GS_ALL_DONE;
     }
   else
     {
-      *expr_p = t1;
+      *expr_p = build2 (MODIFY_EXPR, TREE_TYPE (lvalue), lvalue, t1);
       return GS_OK;
     }
 }
@@ -2867,12 +2864,12 @@ gimplify_cond_expr (tree *expr_p, gimple
 	 if this branch is void; in C++ it can be, if it's a throw.  */
       if (TREE_TYPE (TREE_OPERAND (expr, 1)) != void_type_node)
 	TREE_OPERAND (expr, 1)
-	  = build_gimple_modify_stmt (tmp, TREE_OPERAND (expr, 1));
+	  = build2 (MODIFY_EXPR, TREE_TYPE (tmp), tmp, TREE_OPERAND (expr, 1));
 
       /* Build the else clause, 't1 = b;'.  */
       if (TREE_TYPE (TREE_OPERAND (expr, 2)) != void_type_node)
 	TREE_OPERAND (expr, 2)
-	  = build_gimple_modify_stmt (tmp, TREE_OPERAND (expr, 2));
+	  = build2 (MODIFY_EXPR, TREE_TYPE (tmp), tmp, TREE_OPERAND (expr, 2));
 
       TREE_TYPE (expr) = void_type_node;
       recalculate_side_effects (expr);
@@ -3009,8 +3006,8 @@ gimplify_modify_expr_to_memcpy (tree *ex
   tree t, to, to_ptr, from, from_ptr;
   gimple gs;
 
-  to = GENERIC_TREE_OPERAND (*expr_p, 0);
-  from = GENERIC_TREE_OPERAND (*expr_p, 1);
+  to = TREE_OPERAND (*expr_p, 0);
+  from = TREE_OPERAND (*expr_p, 1);
 
   from_ptr = build_fold_addr_expr (from);
   gimplify_arg (&from_ptr, seq_p);
@@ -3052,7 +3049,7 @@ gimplify_modify_expr_to_memset (tree *ex
   /* Assert our assumptions, to abort instead of producing wrong code
      silently if they are not met.  Beware that the RHS CONSTRUCTOR might
      not be immediately exposed.  */
-  from = GENERIC_TREE_OPERAND (*expr_p, 1);  
+  from = TREE_OPERAND (*expr_p, 1);  
   if (TREE_CODE (from) == WITH_SIZE_EXPR)
     from = TREE_OPERAND (from, 0);
 
@@ -3060,7 +3057,7 @@ gimplify_modify_expr_to_memset (tree *ex
 	      && VEC_empty (constructor_elt, CONSTRUCTOR_ELTS (from)));
 
   /* Now proceed.  */
-  to = GENERIC_TREE_OPERAND (*expr_p, 0);
+  to = TREE_OPERAND (*expr_p, 0);
 
   to_ptr = build_fold_addr_expr (to);
   gimplify_arg (&to_ptr, seq_p);
@@ -3426,7 +3423,7 @@ gimplify_init_constructor (tree *expr_p,
 			   bool want_value, bool notify_temp_creation)
 {
   tree object;
-  tree ctor = GENERIC_TREE_OPERAND (*expr_p, 1);
+  tree ctor = TREE_OPERAND (*expr_p, 1);
   tree type = TREE_TYPE (ctor);
   enum gimplify_status ret;
   VEC(constructor_elt,gc) *elts;
@@ -3436,13 +3433,13 @@ gimplify_init_constructor (tree *expr_p,
 
   if (!notify_temp_creation)
     {
-      ret = gimplify_expr (&GENERIC_TREE_OPERAND (*expr_p, 0), pre_p, post_p,
+      ret = gimplify_expr (&TREE_OPERAND (*expr_p, 0), pre_p, post_p,
 			   is_gimple_lvalue, fb_lvalue);
       if (ret == GS_ERROR)
 	return ret;
     }
 
-  object = GENERIC_TREE_OPERAND (*expr_p, 0);
+  object = TREE_OPERAND (*expr_p, 0);
   elts = CONSTRUCTOR_ELTS (ctor);
   ret = GS_ALL_DONE;
 
@@ -3578,7 +3575,7 @@ gimplify_init_constructor (tree *expr_p,
 		  }
 	        walk_tree (&DECL_INITIAL (new), force_labels_r, NULL, NULL);
 
-		GENERIC_TREE_OPERAND (*expr_p, 1) = new;
+		TREE_OPERAND (*expr_p, 1) = new;
 
 		/* This is no longer an assignment of a CONSTRUCTOR, but
 		   we still may have processing to do on the LHS.  So
@@ -3600,7 +3597,7 @@ gimplify_init_constructor (tree *expr_p,
 	      preeval_data.lhs_base_decl = NULL;
 	    preeval_data.lhs_alias_set = get_alias_set (object);
 
-	    gimplify_init_ctor_preeval (&GENERIC_TREE_OPERAND (*expr_p, 1),
+	    gimplify_init_ctor_preeval (&TREE_OPERAND (*expr_p, 1),
 					pre_p, post_p, &preeval_data);
 	  }
 
@@ -3714,8 +3711,8 @@ gimplify_init_constructor (tree *expr_p,
 	    if (tret == GS_ERROR)
 	      ret = GS_ERROR;
 	  }
-	if (!is_gimple_reg (GENERIC_TREE_OPERAND (*expr_p, 0)))
-	  GENERIC_TREE_OPERAND (*expr_p, 1) = get_formal_tmp_var (ctor, pre_p);
+	if (!is_gimple_reg (TREE_OPERAND (*expr_p, 0)))
+	  TREE_OPERAND (*expr_p, 1) = get_formal_tmp_var (ctor, pre_p);
       }
       break;
 
@@ -4068,8 +4065,8 @@ gimplify_modify_expr_complex_part (tree 
   enum tree_code code, ocode;
   tree lhs, rhs, new_rhs, other, realpart, imagpart;
 
-  lhs = GENERIC_TREE_OPERAND (*expr_p, 0);
-  rhs = GENERIC_TREE_OPERAND (*expr_p, 1);
+  lhs = TREE_OPERAND (*expr_p, 0);
+  rhs = TREE_OPERAND (*expr_p, 1);
   code = TREE_CODE (lhs);
   lhs = TREE_OPERAND (lhs, 0);
 
@@ -4111,13 +4108,12 @@ static enum gimplify_status
 gimplify_modify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
 		      bool want_value)
 {
-  tree *from_p = &GENERIC_TREE_OPERAND (*expr_p, 1);
-  tree *to_p = &GENERIC_TREE_OPERAND (*expr_p, 0);
+  tree *from_p = &TREE_OPERAND (*expr_p, 1);
+  tree *to_p = &TREE_OPERAND (*expr_p, 0);
   enum gimplify_status ret = GS_UNHANDLED;
   gimple assign;
 
   gcc_assert (TREE_CODE (*expr_p) == MODIFY_EXPR
-	      || TREE_CODE (*expr_p) == GIMPLE_MODIFY_STMT
 	      || TREE_CODE (*expr_p) == INIT_EXPR);
 
   /* Insert pointer conversions required by the middle-end that are not
@@ -5730,9 +5726,8 @@ gimplify_omp_for (tree *expr_p, gimple_s
   for (i = 0; i < TREE_VEC_LENGTH (OMP_FOR_INIT (for_stmt)); i++)
     {
       t = TREE_VEC_ELT (OMP_FOR_INIT (for_stmt), i);
-      gcc_assert (TREE_CODE (t) == MODIFY_EXPR
-		  || TREE_CODE (t) == GIMPLE_MODIFY_STMT);
-      decl = GENERIC_TREE_OPERAND (t, 0);
+      gcc_assert (TREE_CODE (t) == MODIFY_EXPR);
+      decl = TREE_OPERAND (t, 0);
       gcc_assert (DECL_P (decl));
       gcc_assert (INTEGRAL_TYPE_P (TREE_TYPE (decl))
 		  || POINTER_TYPE_P (TREE_TYPE (decl)));
@@ -5749,7 +5744,7 @@ gimplify_omp_for (tree *expr_p, gimple_s
       if (!is_gimple_reg (decl))
 	{
 	  var = create_tmp_var (TREE_TYPE (decl), get_name (decl));
-	  GENERIC_TREE_OPERAND (t, 0) = var;
+	  TREE_OPERAND (t, 0) = var;
                               
 	  gimplify_seq_add_stmt (&for_body, gimple_build_assign (decl, var));
 
@@ -5758,7 +5753,7 @@ gimplify_omp_for (tree *expr_p, gimple_s
       else
 	var = decl;
 
-      ret |= gimplify_expr (&GENERIC_TREE_OPERAND (t, 1), &for_pre_body, NULL,
+      ret |= gimplify_expr (&TREE_OPERAND (t, 1), &for_pre_body, NULL,
 			    is_gimple_val, fb_rvalue);
       if (ret == GS_ERROR)
 	return ret;
@@ -5766,9 +5761,9 @@ gimplify_omp_for (tree *expr_p, gimple_s
       /* Handle OMP_FOR_COND.  */
       t = TREE_VEC_ELT (OMP_FOR_COND (for_stmt), i);
       gcc_assert (COMPARISON_CLASS_P (t));
-      gcc_assert (GENERIC_TREE_OPERAND (t, 0) == decl);
+      gcc_assert (TREE_OPERAND (t, 0) == decl);
 
-      ret |= gimplify_expr (&GENERIC_TREE_OPERAND (t, 1), &for_pre_body, NULL,
+      ret |= gimplify_expr (&TREE_OPERAND (t, 1), &for_pre_body, NULL,
 			    is_gimple_val, fb_rvalue);
 
       /* Handle OMP_FOR_INCR.  */
@@ -5779,7 +5774,7 @@ gimplify_omp_for (tree *expr_p, gimple_s
 	case POSTINCREMENT_EXPR:
 	  t = build_int_cst (TREE_TYPE (decl), 1);
 	  t = build2 (PLUS_EXPR, TREE_TYPE (decl), var, t);
-	  t = build_gimple_modify_stmt (var, t);
+	  t = build2 (MODIFY_EXPR, TREE_TYPE (var), var, t);
 	  TREE_VEC_ELT (OMP_FOR_INCR (for_stmt), i) = t;
 	  break;
 
@@ -5787,21 +5782,15 @@ gimplify_omp_for (tree *expr_p, gimple_s
 	case POSTDECREMENT_EXPR:
 	  t = build_int_cst (TREE_TYPE (decl), -1);
 	  t = build2 (PLUS_EXPR, TREE_TYPE (decl), var, t);
-	  t = build_gimple_modify_stmt (var, t);
+	  t = build2 (MODIFY_EXPR, TREE_TYPE (var), var, t);
 	  TREE_VEC_ELT (OMP_FOR_INCR (for_stmt), i) = t;
 	  break;
 
 	case MODIFY_EXPR:
-	  t = build_gimple_modify_stmt (TREE_OPERAND (t, 0),
-					TREE_OPERAND (t, 1));
-	  TREE_VEC_ELT (OMP_FOR_INCR (for_stmt), i) = t;
-	  /* Fallthru.  */
-
-	case GIMPLE_MODIFY_STMT:
-	  gcc_assert (GIMPLE_STMT_OPERAND (t, 0) == decl);
-	  GIMPLE_STMT_OPERAND (t, 0) = var;
+	  gcc_assert (TREE_OPERAND (t, 0) == decl);
+	  TREE_OPERAND (t, 0) = var;
 
-	  t = GIMPLE_STMT_OPERAND (t, 1);
+	  t = TREE_OPERAND (t, 1);
 	  switch (TREE_CODE (t))
 	    {
 	    case PLUS_EXPR:
@@ -5839,17 +5828,17 @@ gimplify_omp_for (tree *expr_p, gimple_s
 		&& OMP_CLAUSE_LASTPRIVATE_GIMPLE_SEQ (c) == NULL)
 	      {
 		t = TREE_VEC_ELT (OMP_FOR_INCR (for_stmt), i);
-		gcc_assert (TREE_CODE (t) == GIMPLE_MODIFY_STMT);
-		gcc_assert (GIMPLE_STMT_OPERAND (t, 0) == var);
-		t = GIMPLE_STMT_OPERAND (t, 1);
+		gcc_assert (TREE_CODE (t) == MODIFY_EXPR);
+		gcc_assert (TREE_OPERAND (t, 0) == var);
+		t = TREE_OPERAND (t, 1);
 		gcc_assert (TREE_CODE (t) == PLUS_EXPR
 			    || TREE_CODE (t) == MINUS_EXPR
 			    || TREE_CODE (t) == POINTER_PLUS_EXPR);
 		gcc_assert (TREE_OPERAND (t, 0) == var);
 		t = build2 (TREE_CODE (t), TREE_TYPE (decl), decl,
 			    TREE_OPERAND (t, 1));
-		t = build_gimple_modify_stmt (decl, t);
-		gimplify_and_add (t, &OMP_CLAUSE_LASTPRIVATE_GIMPLE_SEQ (c));
+		gimplify_assign (decl, t,
+				 &OMP_CLAUSE_LASTPRIVATE_GIMPLE_SEQ (c));
 	    }
 	}
     }
@@ -5865,13 +5854,13 @@ gimplify_omp_for (tree *expr_p, gimple_s
   for (i = 0; i < TREE_VEC_LENGTH (OMP_FOR_INIT (for_stmt)); i++)
     {
       t = TREE_VEC_ELT (OMP_FOR_INIT (for_stmt), i);
-      gimple_omp_for_set_index (gfor, i, GENERIC_TREE_OPERAND (t, 0));
-      gimple_omp_for_set_initial (gfor, i, GENERIC_TREE_OPERAND (t, 1));
+      gimple_omp_for_set_index (gfor, i, TREE_OPERAND (t, 0));
+      gimple_omp_for_set_initial (gfor, i, TREE_OPERAND (t, 1));
       t = TREE_VEC_ELT (OMP_FOR_COND (for_stmt), i);
       gimple_omp_for_set_cond (gfor, i, TREE_CODE (t));
-      gimple_omp_for_set_final (gfor, i, GENERIC_TREE_OPERAND (t, 1));
+      gimple_omp_for_set_final (gfor, i, TREE_OPERAND (t, 1));
       t = TREE_VEC_ELT (OMP_FOR_INCR (for_stmt), i);
-      gimple_omp_for_set_incr (gfor, i, GIMPLE_STMT_OPERAND (t, 1));
+      gimple_omp_for_set_incr (gfor, i, TREE_OPERAND (t, 1));
     }
 
   gimplify_seq_add_stmt (pre_p, gfor);
@@ -6189,8 +6178,7 @@ gimplify_expr (tree *expr_p, gimple_seq 
 
       /* Die, die, die, my darling.  */
       if (save_expr == error_mark_node
-	  || (!GIMPLE_STMT_P (save_expr)
-	      && TREE_TYPE (save_expr)
+	  || (TREE_TYPE (save_expr)
 	      && TREE_TYPE (save_expr) == error_mark_node))
 	{
 	  ret = GS_ERROR;
@@ -6268,7 +6256,6 @@ gimplify_expr (tree *expr_p, gimple_seq 
 	  break;
 
 	case MODIFY_EXPR:
-	case GIMPLE_MODIFY_STMT:
 	case INIT_EXPR:
 	  ret = gimplify_modify_expr (expr_p, pre_p, post_p,
 				      fallback != fb_none);
@@ -6829,7 +6816,7 @@ gimplify_expr (tree *expr_p, gimple_seq 
 	     given a TREE_ADDRESSABLE type.  */
 	  tree tmp = create_tmp_var_raw (type, "vol");
 	  gimple_add_tmp_var (tmp);
-	  *expr_p = build_gimple_modify_stmt (tmp, *expr_p);
+	  *expr_p = build2 (MODIFY_EXPR, TREE_TYPE (tmp), tmp, *expr_p);
 	}
       else
 	/* We can't do anything useful with a volatile reference to
@@ -6875,7 +6862,6 @@ gimplify_expr (tree *expr_p, gimple_seq 
       enum tree_code code = TREE_CODE (*expr_p);
       /* These expressions should already be in gimple IR form.  */
       gcc_assert (code != MODIFY_EXPR
-	  	  && code != GIMPLE_MODIFY_STMT
 		  && code != ASM_EXPR
 		  && code != BIND_EXPR
 		  && code != CATCH_EXPR
@@ -7098,16 +7084,15 @@ gimplify_one_sizepos (tree *expr_p, gimp
       && TYPE_IS_SIZETYPE (type))
     {
       tree tmp;
+      gimple stmt;
 
       *expr_p = create_tmp_var (type, NULL);
       tmp = build1 (NOP_EXPR, type, expr);
-      tmp = build_gimple_modify_stmt (*expr_p, tmp);
+      stmt = gimplify_assign (*expr_p, tmp, stmt_p);
       if (EXPR_HAS_LOCATION (expr))
-        SET_EXPR_LOCUS (tmp, EXPR_LOCUS (expr));
+	gimple_set_location (stmt, *EXPR_LOCUS (expr));
       else
-        SET_EXPR_LOCATION (tmp, input_location);
-
-      gimplify_and_add (tmp, stmt_p);
+	gimple_set_location (stmt, input_location);
     }
 }
 
@@ -7296,9 +7281,9 @@ force_gimple_operand (tree expr, gimple_
   gimplify_ctxp->allow_rhs_cond_expr = true;
 
   if (var)
-    expr = build_gimple_modify_stmt (var, expr);
+    expr = build2 (MODIFY_EXPR, TREE_TYPE (var), var, expr);
 
-  if (TREE_CODE (expr) != GIMPLE_MODIFY_STMT
+  if (TREE_CODE (expr) != MODIFY_EXPR
       && TREE_TYPE (expr) == void_type_node)
     {
       gimplify_and_add (expr, stmts);
Index: tree.def
===================================================================
--- tree.def	(revision 137784)
+++ tree.def	(working copy)
@@ -1089,11 +1089,6 @@ DEFTREECODE (WIDEN_MULT_EXPR, "widen_mul
 DEFTREECODE (VEC_LSHIFT_EXPR, "vec_lshift_expr", tcc_binary, 2)
 DEFTREECODE (VEC_RSHIFT_EXPR, "vec_rshift_expr", tcc_binary, 2)
 
-/* GIMPLE tree codes.  */
-
-/* Assignment expression.  Operand 0 is the what to set; 1, the new value.  */
-DEFTREECODE (GIMPLE_MODIFY_STMT, "gimple_modify_stmt", tcc_gimple_stmt, 2)
-
 /* Widening vector multiplication.
    The two operands are vectors with N elements of size S. Multiplying the
    elements of the two vectors will result in N products of size 2*S.
Index: cfgexpand.c
===================================================================
--- cfgexpand.c	(revision 137784)
+++ cfgexpand.c	(working copy)
@@ -106,8 +106,14 @@ gimple_to_tree (gimple stmt)
   switch (gimple_code (stmt))
     {
     case GIMPLE_ASSIGN:
-      t = gimple_assign_rhs_to_tree (stmt);
-      t = build_gimple_modify_stmt (gimple_assign_lhs (stmt), t);
+      {
+	tree lhs = gimple_assign_lhs (stmt);
+
+	t = gimple_assign_rhs_to_tree (stmt);
+	t = build2 (MODIFY_EXPR, TREE_TYPE (lhs), lhs, t);
+	if (gimple_assign_nontemporal_move_p (stmt))
+	  MOVE_NONTEMPORAL (t) = true;
+      }
       break;
 	                                 
     case GIMPLE_COND:
@@ -139,7 +145,8 @@ gimple_to_tree (gimple stmt)
 		/* I believe that a function's RESULT_DECL is unique.  */
 		gcc_assert (TREE_CODE (retval) != RESULT_DECL);
 
-		retval = build_gimple_modify_stmt (result, retval);
+		retval = build2 (MODIFY_EXPR, TREE_TYPE (result),
+				 result, retval);
 	      }
 	  }
         t =  build1 (RETURN_EXPR, void_type_node, retval);
@@ -232,8 +239,12 @@ gimple_to_tree (gimple stmt)
         CALL_EXPR_VA_ARG_PACK (t) = gimple_call_va_arg_pack_p (stmt);
 
         /* If the call has a LHS then create a MODIFY_EXPR to hold it.  */
-        if (gimple_call_lhs (stmt))
-          t = build_gimple_modify_stmt (gimple_call_lhs (stmt), t);
+	{
+	  tree lhs = gimple_call_lhs (stmt);
+
+	  if (lhs)
+	    t = build2 (MODIFY_EXPR, TREE_TYPE (lhs), lhs, t);
+	}
 
         /* Record the original call statement, as it may be used
            to retrieve profile information during expansion.  */
Index: tree-predcom.c
===================================================================
--- tree-predcom.c	(revision 137784)
+++ tree-predcom.c	(working copy)
@@ -1244,7 +1244,7 @@ replace_ref_with (gimple stmt, tree new,
       psi = gsi_for_stmt (stmt);
       remove_phi_node (&psi, false);
 
-      /* Turn the phi node into GIMPLE_MODIFY_STMT.  */
+      /* Turn the phi node into GIMPLE_ASSIGN.  */
       new_stmt = gimple_build_assign (val, new);
       gsi_insert_before (&bsi, new_stmt, GSI_NEW_STMT);
       return;
Index: print-tree.c
===================================================================
--- print-tree.c	(revision 137784)
+++ print-tree.c	(working copy)
@@ -282,7 +282,7 @@ print_node (FILE *file, const char *pref
       if (indent <= 4)
 	print_node_brief (file, "type", TREE_TYPE (node), indent + 4);
     }
-  else if (!GIMPLE_TUPLE_P (node))
+  else
     {
       print_node (file, "type", TREE_TYPE (node), indent + 4);
       if (TREE_TYPE (node))
@@ -707,18 +707,6 @@ print_node (FILE *file, const char *pref
       print_node (file, "chain", TREE_CHAIN (node), indent + 4);
       break;
 
-    case tcc_gimple_stmt:
-      len = TREE_CODE_LENGTH (TREE_CODE (node));
-
-      for (i = 0; i < len; i++)
-	{
-	  char temp[10];
-
-	  sprintf (temp, "arg %d", i);
-	  print_node (file, temp, GIMPLE_STMT_OPERAND (node, i), indent + 4);
-	}
-      break;
-
     case tcc_constant:
     case tcc_exceptional:
       switch (TREE_CODE (node))
Index: tree-ssa-ter.c
===================================================================
--- tree-ssa-ter.c	(revision 137784)
+++ tree-ssa-ter.c	(working copy)
@@ -88,7 +88,7 @@ along with GCC; see the file COPYING3.  
    TER implements this but stepping through the instructions in a block and
    tracking potential expressions for replacement, and the partitions they are
    dependent on.  Expressions are represented by the SSA_NAME_VERSION of the
-   DEF on the LHS of a GIMPLE_MODIFY_STMT and the expression is the RHS.
+   DEF on the LHS of a GIMPLE_ASSIGN and the expression is the RHS.
 
    When a stmt is determined to be a possible replacement expression, the
    following steps are taken:
Index: tree-ssa.c
===================================================================
--- tree-ssa.c	(revision 137784)
+++ tree-ssa.c	(working copy)
@@ -1235,12 +1235,9 @@ tree_ssa_useless_type_conversion (tree e
   if (CONVERT_EXPR_P (expr)
       || TREE_CODE (expr) == VIEW_CONVERT_EXPR
       || TREE_CODE (expr) == NON_LVALUE_EXPR)
-    /* FIXME: Use of GENERIC_TREE_TYPE here is a temporary measure to work
-       around known bugs with GIMPLE_MODIFY_STMTs appearing in places
-       they shouldn't.  See PR 30391.  */
     return useless_type_conversion_p
       (TREE_TYPE (expr),
-       GENERIC_TREE_TYPE (TREE_OPERAND (expr, 0)));
+       TREE_TYPE (TREE_OPERAND (expr, 0)));
 
   return false;
 }
Index: tree-inline.c
===================================================================
--- tree-inline.c	(revision 137784)
+++ tree-inline.c	(working copy)
@@ -62,7 +62,7 @@ along with GCC; see the file COPYING3.  
 
    Inlining: a function body is duplicated, but the PARM_DECLs are
    remapped into VAR_DECLs, and non-void RETURN_EXPRs become
-   GIMPLE_MODIFY_STMTs that store to a dedicated returned-value variable.
+   MODIFY_EXPRs that store to a dedicated returned-value variable.
    The duplicated eh_region info of the copy will later be appended
    to the info for the caller; the eh_region info in copied throwing
    statements and RESX_EXPRs is adjusted accordingly.
@@ -674,8 +674,6 @@ remap_gimple_op_r (tree *tp, int *walk_s
     }
   else
     {
-      gcc_assert (!GIMPLE_TUPLE_P (*tp));
-
       /* Otherwise, just copy the node.  Note that copy_tree_r already
 	 knows not to copy VAR_DECLs, etc., so this is safe.  */
       if (TREE_CODE (*tp) == INDIRECT_REF)
@@ -807,7 +805,7 @@ copy_tree_body_r (tree *tp, int *walk_su
      duplicated and/or tweaked.  */
 
   /* When requested, RETURN_EXPRs should be transformed to just the
-     contained GIMPLE_MODIFY_STMT.  The branch semantics of the return will
+     contained MODIFY_EXPR.  The branch semantics of the return will
      be handled elsewhere by manipulating the CFG rather than a statement.  */
   if (TREE_CODE (*tp) == RETURN_EXPR && id->transform_return_to_modify)
     {
@@ -818,10 +816,10 @@ copy_tree_body_r (tree *tp, int *walk_su
 	 If the "assignment" is just the result decl, the result
 	 decl has already been set (e.g. a recent "foo (&result_decl,
 	 ...)"); just toss the entire RETURN_EXPR.  */
-      if (assignment && TREE_CODE (assignment) == GIMPLE_MODIFY_STMT)
+      if (assignment && TREE_CODE (assignment) == MODIFY_EXPR)
 	{
 	  /* Replace the RETURN_EXPR with (a copy of) the
-	     GIMPLE_MODIFY_STMT hanging underneath.  */
+	     MODIFY_EXPR hanging underneath.  */
 	  *tp = copy_node (assignment);
 	}
       else /* Else the RETURN_EXPR returns no value.  */
@@ -894,14 +892,14 @@ copy_tree_body_r (tree *tp, int *walk_su
       /* Here we handle trees that are not completely rewritten.
 	 First we detect some inlining-induced bogosities for
 	 discarding.  */
-      if (TREE_CODE (*tp) == GIMPLE_MODIFY_STMT
-	  && GIMPLE_STMT_OPERAND (*tp, 0) == GIMPLE_STMT_OPERAND (*tp, 1)
-	  && (auto_var_in_fn_p (GIMPLE_STMT_OPERAND (*tp, 0), fn)))
+      if (TREE_CODE (*tp) == MODIFY_EXPR
+	  && TREE_OPERAND (*tp, 0) == TREE_OPERAND (*tp, 1)
+	  && (auto_var_in_fn_p (TREE_OPERAND (*tp, 0), fn)))
 	{
 	  /* Some assignments VAR = VAR; don't generate any rtl code
 	     and thus don't count as variable modification.  Avoid
 	     keeping bogosities like 0 = 0.  */
-	  tree decl = GIMPLE_STMT_OPERAND (*tp, 0), value;
+	  tree decl = TREE_OPERAND (*tp, 0), value;
 	  tree *n;
 
 	  n = (tree *) pointer_map_contains (id->decl_map, decl);
@@ -975,7 +973,7 @@ copy_tree_body_r (tree *tp, int *walk_su
       /* If EXPR has block defined, map it to newly constructed block.
          When inlining we want EXPRs without block appear in the block
 	 of function call.  */
-      if (EXPR_P (*tp) || GIMPLE_STMT_P (*tp))
+      if (EXPR_P (*tp))
 	{
 	  new_block = id->block;
 	  if (TREE_BLOCK (*tp))
@@ -995,7 +993,7 @@ copy_tree_body_r (tree *tp, int *walk_su
 			 id->eh_region_offset
 			 + TREE_INT_CST_LOW (TREE_OPERAND (*tp, 0)));
 
-      if (!GIMPLE_TUPLE_P (*tp) && TREE_CODE (*tp) != OMP_CLAUSE)
+      if (TREE_CODE (*tp) != OMP_CLAUSE)
 	TREE_TYPE (*tp) = remap_type (TREE_TYPE (*tp), id);
 
       /* The copied TARGET_EXPR has never been expanded, even if the
@@ -1999,7 +1997,7 @@ setup_one_parameter (copy_body_data *id,
 
       STRIP_USELESS_TYPE_CONVERSION (rhs);
 
-      /* We want to use GIMPLE_MODIFY_STMT, not INIT_EXPR here so that we
+      /* We want to use MODIFY_EXPR, not INIT_EXPR here so that we
 	 keep our trees in gimple form.  */
       if (def && gimple_in_ssa_p (cfun) && is_gimple_reg (p))
 	{
@@ -2105,7 +2103,7 @@ initialize_inlined_parameters (copy_body
 
    RETURN_SLOT, if non-null is place where to store the result.  It
    is set only for CALL_EXPR_RETURN_SLOT_OPT.  MODIFY_DEST, if non-null,
-   was the LHS of the GIMPLE_MODIFY_STMT to which this call is the RHS.
+   was the LHS of the MODIFY_EXPR to which this call is the RHS.
 
    The return value is a (possibly null) value that is the result of the
    function as seen by the callee.  *USE_P is a (possibly null) value that
@@ -3377,7 +3375,7 @@ expand_call_inline (basic_block bb, gimp
 
 /* Expand call statements reachable from STMT_P.
    We can only have CALL_EXPRs as the "toplevel" tree code or nested
-   in a GIMPLE_MODIFY_STMT.  See tree-gimple.c:get_call_expr_in().  We can
+   in a MODIFY_EXPR.  See tree-gimple.c:get_call_expr_in().  We can
    unfortunately not use that function here because we need a pointer
    to the CALL_EXPR, not the tree itself.  */
 
@@ -3553,7 +3551,6 @@ copy_tree_r (tree *tp, int *walk_subtree
 
   /* We make copies of most nodes.  */
   if (IS_EXPR_CODE_CLASS (cl)
-      || IS_GIMPLE_STMT_CODE_CLASS (cl)
       || code == TREE_LIST
       || code == TREE_VEC
       || code == TYPE_DECL
@@ -3563,8 +3560,7 @@ copy_tree_r (tree *tp, int *walk_subtree
 	 here.  */
       tree chain = NULL_TREE, new;
 
-      if (!GIMPLE_TUPLE_P (*tp))
-	chain = TREE_CHAIN (*tp);
+      chain = TREE_CHAIN (*tp);
 
       /* Copy the node.  */
       new = copy_node (*tp);
Index: gimple.c
===================================================================
--- gimple.c	(revision 137784)
+++ gimple.c	(working copy)
@@ -1889,7 +1889,7 @@ gimple_assign_unary_nop_p (gimple gs)
               || gimple_assign_rhs_code (gs) == NON_LVALUE_EXPR)
           && gimple_assign_rhs1 (gs) != error_mark_node
           && (TYPE_MODE (TREE_TYPE (gimple_assign_lhs (gs)))
-              == TYPE_MODE (GENERIC_TREE_TYPE (gimple_assign_rhs1 (gs)))));
+              == TYPE_MODE (TREE_TYPE (gimple_assign_rhs1 (gs)))));
 }
 
 /* Set BB to be the basic block holding G.  */
Index: gimple.h
===================================================================
--- gimple.h	(revision 137784)
+++ gimple.h	(working copy)
@@ -852,6 +852,8 @@ unsigned get_gimple_rhs_num_ops (enum tr
    for validating arguments in inline functions defined here.
    We should merge gimple.[hc] and tree-gimple.[hc].  */
 extern bool is_gimple_val (tree);
+extern bool is_gimple_lvalue (tree);
+extern tree force_gimple_operand (tree, gimple_seq *, bool, tree);
 
 /* In builtins.c  */
 extern bool validate_gimple_arglist (const_gimple, ...);
@@ -1686,6 +1688,25 @@ gimple_assign_cast_p (gimple s)
 }
 
 
+/* Build a new GIMPLE_ASSIGN tuple and append it to the end of *SEQ_P.
+
+   DST/SRC are the destination and source respectively.  You can pass
+   ungimplified trees in DST or SRC, in which case they will be
+   converted to a gimple operand if necessary.
+
+   This function returns the newly created GIMPLE_ASSIGN tuple.  */
+
+static inline gimple
+gimplify_assign (tree dst, tree src, gimple_seq *seq_p)
+{
+  /* FIXME tuples.  Add smarts to build the GIMPLE_ASSIGN directly.  */
+  extern void gimplify_and_add (tree, gimple_seq *);
+  tree t = build2 (MODIFY_EXPR, TREE_TYPE (dst), dst, src);
+  gimplify_and_add (t, seq_p);
+  return gimple_seq_last_stmt (*seq_p);
+}
+
+
 /* Return true if GS is a GIMPLE_CALL.  */
 
 static inline bool
Index: tree-cfg.c
===================================================================
--- tree-cfg.c	(revision 137784)
+++ tree-cfg.c	(working copy)
@@ -2800,10 +2800,7 @@ verify_expr (tree *tp, int *walk_subtree
       break;
 
     case MODIFY_EXPR:
-      gcc_unreachable ();
-
-    case GIMPLE_MODIFY_STMT:
-      x = GIMPLE_STMT_OPERAND (t, 0);
+      x = TREE_OPERAND (t, 0);
       if (TREE_CODE (x) == BIT_FIELD_REF
 	  && is_gimple_reg (TREE_OPERAND (x, 0)))
 	{
@@ -3527,7 +3524,6 @@ verify_types_in_gimple_assign (gimple st
     case TREE_LIST:
     case COMPOUND_EXPR:
     case MODIFY_EXPR:
-    case GIMPLE_MODIFY_STMT:
     case INIT_EXPR:
     case GOTO_EXPR:
     case LABEL_EXPR:
@@ -5258,7 +5254,7 @@ move_stmt_op (tree *tp, int *walk_subtre
   struct move_stmt_d *p = (struct move_stmt_d *) wi->info;
   tree t = *tp;
 
-  if (EXPR_P (t) || GIMPLE_STMT_P (t))
+  if (EXPR_P (t))
     {
       tree block = TREE_BLOCK (t);
       if (p->orig_block == NULL_TREE
Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c	(revision 137784)
+++ config/i386/i386.c	(working copy)
@@ -5459,8 +5459,8 @@ ix86_va_start (tree valist, rtx nextarg)
   if (cfun->va_list_gpr_size)
     {
       type = TREE_TYPE (gpr);
-      t = build2 (GIMPLE_MODIFY_STMT, type, gpr,
-		  build_int_cst (type, n_gpr * 8));
+      t = build2 (MODIFY_EXPR, type,
+		  gpr, build_int_cst (type, n_gpr * 8));
       TREE_SIDE_EFFECTS (t) = 1;
       expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
     }
@@ -5468,7 +5468,7 @@ ix86_va_start (tree valist, rtx nextarg)
   if (cfun->va_list_fpr_size)
     {
       type = TREE_TYPE (fpr);
-      t = build2 (GIMPLE_MODIFY_STMT, type, fpr,
+      t = build2 (MODIFY_EXPR, type, fpr,
 		  build_int_cst (type, n_fpr * 16 + 8*X86_64_REGPARM_MAX));
       TREE_SIDE_EFFECTS (t) = 1;
       expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
@@ -5480,7 +5480,7 @@ ix86_va_start (tree valist, rtx nextarg)
   if (words != 0)
     t = build2 (POINTER_PLUS_EXPR, type, t,
 	        size_int (words * UNITS_PER_WORD));
-  t = build2 (GIMPLE_MODIFY_STMT, type, ovf, t);
+  t = build2 (MODIFY_EXPR, type, ovf, t);
   TREE_SIDE_EFFECTS (t) = 1;
   expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
 
@@ -5490,7 +5490,7 @@ ix86_va_start (tree valist, rtx nextarg)
 	 Prologue of the function save it right above stack frame.  */
       type = TREE_TYPE (sav);
       t = make_tree (type, frame_pointer_rtx);
-      t = build2 (GIMPLE_MODIFY_STMT, type, sav, t);
+      t = build2 (MODIFY_EXPR, type, sav, t);
       TREE_SIDE_EFFECTS (t) = 1;
       expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
     }
@@ -5629,16 +5629,14 @@ ix86_gimplify_va_arg (tree valist, tree 
 	  /* int_addr = gpr + sav; */
 	  t = fold_convert (sizetype, gpr);
 	  t = build2 (POINTER_PLUS_EXPR, ptr_type_node, sav, t);
-	  t = build2 (GIMPLE_MODIFY_STMT, void_type_node, int_addr, t);
-	  gimplify_and_add (t, pre_p);
+	  gimplify_assign (int_addr, t, pre_p);
 	}
       if (needed_sseregs)
 	{
 	  /* sse_addr = fpr + sav; */
 	  t = fold_convert (sizetype, fpr);
 	  t = build2 (POINTER_PLUS_EXPR, ptr_type_node, sav, t);
-	  t = build2 (GIMPLE_MODIFY_STMT, void_type_node, sse_addr, t);
-	  gimplify_and_add (t, pre_p);
+	  gimplify_assign (sse_addr, t, pre_p);
 	}
       if (need_temp)
 	{
@@ -5647,8 +5645,7 @@ ix86_gimplify_va_arg (tree valist, tree 
 
 	  /* addr = &temp; */
 	  t = build1 (ADDR_EXPR, build_pointer_type (type), temp);
-	  t = build2 (GIMPLE_MODIFY_STMT, void_type_node, addr, t);
-	  gimplify_and_add (t, pre_p);
+	  gimplify_assign (addr, t, pre_p);
 
 	  for (i = 0; i < XVECLEN (container, 0); i++)
 	    {
@@ -5681,8 +5678,7 @@ ix86_gimplify_va_arg (tree valist, tree 
 				       size_int (INTVAL (XEXP (slot, 1))));
 	      dest = build_va_arg_indirect_ref (dest_addr);
 
-	      t = build2 (GIMPLE_MODIFY_STMT, void_type_node, dest, src);
-	      gimplify_and_add (t, pre_p);
+	      gimplify_assign (dest, src, pre_p);
 	    }
 	}
 
@@ -5690,16 +5686,14 @@ ix86_gimplify_va_arg (tree valist, tree 
 	{
 	  t = build2 (PLUS_EXPR, TREE_TYPE (gpr), gpr,
 		      build_int_cst (TREE_TYPE (gpr), needed_intregs * 8));
-	  t = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (gpr), gpr, t);
-	  gimplify_and_add (t, pre_p);
+	  gimplify_assign (gpr, t, pre_p);
 	}
 
       if (needed_sseregs)
 	{
 	  t = build2 (PLUS_EXPR, TREE_TYPE (fpr), fpr,
 		      build_int_cst (TREE_TYPE (fpr), needed_sseregs * 16));
-	  t = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (fpr), fpr, t);
-	  gimplify_and_add (t, pre_p);
+	  gimplify_assign (fpr, t, pre_p);
 	}
 
       gimple_seq_add_stmt (pre_p, gimple_build_goto (lab_over));
@@ -5724,14 +5718,11 @@ ix86_gimplify_va_arg (tree valist, tree 
       t = fold_convert (TREE_TYPE (ovf), t);
     }
   gimplify_expr (&t, pre_p, NULL, is_gimple_val, fb_rvalue);
-
-  t2 = build2 (GIMPLE_MODIFY_STMT, void_type_node, addr, t);
-  gimplify_and_add (t2, pre_p);
+  gimplify_assign (addr, t, pre_p);
 
   t = build2 (POINTER_PLUS_EXPR, TREE_TYPE (t), t,
 	      size_int (rsize * UNITS_PER_WORD));
-  t = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (ovf), unshare_expr (ovf), t);
-  gimplify_and_add (t, pre_p);
+  gimplify_assign (unshare_expr (ovf), t, pre_p);
 
   if (container)
     gimple_seq_add_stmt (pre_p, gimple_build_label (lab_over));
Index: stmt.c
===================================================================
--- stmt.c	(revision 137784)
+++ stmt.c	(working copy)
@@ -1356,9 +1356,6 @@ expand_expr_stmt (tree exp)
   tree type;
 
   value = expand_expr (exp, const0_rtx, VOIDmode, EXPAND_NORMAL);
-  if (GIMPLE_TUPLE_P (exp))
-    type = void_type_node;
-  else
   type = TREE_TYPE (exp);
 
   /* If all we do is reference a volatile value in memory,
@@ -1412,7 +1409,6 @@ warn_if_unused_value (const_tree exp, lo
     case PREDECREMENT_EXPR:
     case POSTDECREMENT_EXPR:
     case MODIFY_EXPR:
-    case GIMPLE_MODIFY_STMT:
     case INIT_EXPR:
     case TARGET_EXPR:
     case CALL_EXPR:
@@ -1581,10 +1577,10 @@ expand_return (tree retval)
       expand_null_return ();
       return;
     }
-  else if ((TREE_CODE (retval) == GIMPLE_MODIFY_STMT
+  else if ((TREE_CODE (retval) == MODIFY_EXPR
 	    || TREE_CODE (retval) == INIT_EXPR)
-	   && TREE_CODE (GENERIC_TREE_OPERAND (retval, 0)) == RESULT_DECL)
-    retval_rhs = GENERIC_TREE_OPERAND (retval, 1);
+	   && TREE_CODE (TREE_OPERAND (retval, 0)) == RESULT_DECL)
+    retval_rhs = TREE_OPERAND (retval, 1);
   else
     retval_rhs = retval;
 
@@ -1603,7 +1599,7 @@ expand_return (tree retval)
      (and in expand_call).  */
 
   else if (retval_rhs != 0
-	   && TYPE_MODE (GENERIC_TREE_TYPE (retval_rhs)) == BLKmode
+	   && TYPE_MODE (TREE_TYPE (retval_rhs)) == BLKmode
 	   && REG_P (result_rtl))
     {
       int i;
Index: tree-ssa-operands.c
===================================================================
--- tree-ssa-operands.c	(revision 137784)
+++ tree-ssa-operands.c	(working copy)
@@ -127,7 +127,7 @@ static struct 
 #define opf_no_vops 	(1 << 1)
 
 /* Operand is an implicit reference.  This is used to distinguish
-   explicit assignments in the form of GIMPLE_MODIFY_STMT from
+   explicit assignments in the form of MODIFY_EXPR from
    clobbering sites like function calls or ASM_EXPRs.  */
 #define opf_implicit	(1 << 2)
 
@@ -1332,7 +1332,7 @@ add_virtual_operand (tree var, gimple st
      check that this only happens on non-specific stores.
 
      Note that if this is a specific store, i.e. associated with a
-     GIMPLE_MODIFY_STMT, then we can't suppress the VDEF, lest we run
+     MODIFY_EXPR, then we can't suppress the VDEF, lest we run
      into validation problems.
 
      This can happen when programs cast away const, leaving us with a


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]