From a89d361b4f95dd216e1d29cb44fbaf90372c48b8 Mon Sep 17 00:00:00 2001
From: David Malcolm <dmalcolm@redhat.com>
Date: Fri, 23 Aug 2013 20:47:19 -0400
Subject: [PATCH 3/6] Autogenerated conversion of gimple to C++

gcc/

	Patch autogenerated by refactor_gimple.py from
	https://github.com/davidmalcolm/gcc-refactoring-scripts
	revision 26aabff11750d29e6129930a426242a564538d1a

	* gimple-iterator.c (update_bb_for_stmts): Update for conversion of
	gimple types to a true class hierarchy.
	(update_call_edge_frequencies): Likewise.
	(gsi_insert_seq_nodes_before): Likewise.
	(gsi_insert_seq_nodes_after): Likewise.
	(gsi_split_seq_after): Likewise.
	(gsi_set_stmt): Likewise.
	(gsi_split_seq_before): Likewise.
	(gsi_remove): Likewise.
	* gimple-pretty-print.c (dump_gimple_debug): Likewise.
	* gimple-streamer-in.c (input_gimple_stmt): Likewise.
	* gimple-streamer-out.c (output_gimple_stmt): Likewise.
	* gimple.c (gimple_set_code): Likewise.
	(gimple_alloc_stat): Likewise.
	(gimple_set_subcode): Likewise.
	(gimple_build_call_internal_1): Likewise.
	(gimple_check_failed): Likewise.
	(gimple_call_flags): Likewise.
	(gimple_set_bb): Likewise.
	* gimple.h (is_a_helper <gimple_statement_asm> (gimple)): New.
	(is_a_helper <gimple_statement_bind> (gimple)): Likewise.
	(is_a_helper <gimple_statement_call> (gimple)): Likewise.
	(is_a_helper <gimple_statement_catch> (gimple)): Likewise.
	(is_a_helper <gimple_statement_eh_ctrl> (gimple)): Likewise.
	(is_a_helper <gimple_statement_eh_else> (gimple)): Likewise.
	(is_a_helper <gimple_statement_eh_filter> (gimple)): Likewise.
	(is_a_helper <gimple_statement_eh_mnt> (gimple)): Likewise.
	(is_a_helper <gimple_statement_omp_atomic_load> (gimple)): Likewise.
	(is_a_helper <gimple_statement_omp_atomic_store> (gimple)): Likewise.
	(is_a_helper <gimple_statement_omp_continue> (gimple)): Likewise.
	(is_a_helper <gimple_statement_omp_critical> (gimple)): Likewise.
	(is_a_helper <gimple_statement_omp_for> (gimple)): Likewise.
	(is_a_helper <gimple_statement_omp_parallel> (gimple)): Likewise.
	(is_a_helper <gimple_statement_omp_sections> (gimple)): Likewise.
	(is_a_helper <gimple_statement_omp_single> (gimple)): Likewise.
	(is_a_helper <gimple_statement_omp_task> (gimple)): Likewise.
	(is_a_helper <gimple_statement_phi> (gimple)): Likewise.
	(is_a_helper <gimple_statement_transaction> (gimple)): Likewise.
	(is_a_helper <gimple_statement_try> (gimple)): Likewise.
	(is_a_helper <gimple_statement_wce> (gimple)): Likewise.
	(is_a_helper <const gimple_statement_asm> (const_gimple)): Likewise.
	(is_a_helper <const gimple_statement_bind> (const_gimple)): Likewise.
	(is_a_helper <const gimple_statement_call> (const_gimple)): Likewise.
	(is_a_helper <const gimple_statement_catch> (const_gimple)): Likewise.
	(is_a_helper <const gimple_statement_eh_ctrl> (const_gimple)):
	Likewise.
	(is_a_helper <const gimple_statement_eh_filter> (const_gimple)):
	Likewise.
	(is_a_helper <const gimple_statement_omp_atomic_load> (const_gimple)):
	Likewise.
	(is_a_helper <const gimple_statement_omp_atomic_store>
	(const_gimple)): Likewise.
	(is_a_helper <const gimple_statement_omp_continue> (const_gimple)):
	Likewise.
	(is_a_helper <const gimple_statement_omp_critical> (const_gimple)):
	Likewise.
	(is_a_helper <const gimple_statement_omp_for> (const_gimple)):
	Likewise.
	(is_a_helper <const gimple_statement_omp_parallel> (const_gimple)):
	Likewise.
	(is_a_helper <const gimple_statement_omp_sections> (const_gimple)):
	Likewise.
	(is_a_helper <const gimple_statement_omp_single> (const_gimple)):
	Likewise.
	(is_a_helper <const gimple_statement_omp_task> (const_gimple)):
	Likewise.
	(is_a_helper <const gimple_statement_phi> (const_gimple)): Likewise.
	(is_a_helper <const gimple_statement_transaction> (const_gimple)):
	Likewise.
	(gimple_seq_last): Update for conversion of gimple types to a true
	class hierarchy.
	(gimple_seq_set_last): Likewise.
	(gimple_code): Likewise.
	(gimple_bb): Likewise.
	(gimple_block): Likewise.
	(gimple_set_block): Likewise.
	(gimple_location): Likewise.
	(gimple_location_ptr): Likewise.
	(gimple_set_location): Likewise.
	(gimple_no_warning_p): Likewise.
	(gimple_set_no_warning): Likewise.
	(gimple_set_visited): Likewise.
	(gimple_visited_p): Likewise.
	(gimple_set_plf): Likewise.
	(gimple_plf): Likewise.
	(gimple_set_uid): Likewise.
	(gimple_uid): Likewise.
	(gimple_init_singleton): Likewise.
	(gimple_modified_p): Likewise.
	(gimple_set_modified): Likewise.
	(gimple_expr_code): Likewise.
	(gimple_has_volatile_ops): Likewise.
	(gimple_set_has_volatile_ops): Likewise.
	(gimple_omp_subcode): Likewise.
	(gimple_omp_set_subcode): Likewise.
	(gimple_omp_return_set_nowait): Likewise.
	(gimple_omp_section_set_last): Likewise.
	(gimple_omp_parallel_set_combined_p): Likewise.
	(gimple_omp_atomic_set_need_value): Likewise.
	(gimple_num_ops): Likewise.
	(gimple_set_num_ops): Likewise.
	(gimple_assign_nontemporal_move_p): Likewise.
	(gimple_assign_set_nontemporal_move): Likewise.
	(gimple_assign_rhs_code): Likewise.
	(gimple_assign_set_rhs_code): Likewise.
	(gimple_call_internal_p): Likewise.
	(gimple_call_set_tail): Likewise.
	(gimple_call_tail_p): Likewise.
	(gimple_call_set_return_slot_opt): Likewise.
	(gimple_call_return_slot_opt_p): Likewise.
	(gimple_call_set_from_thunk): Likewise.
	(gimple_call_from_thunk_p): Likewise.
	(gimple_call_set_va_arg_pack): Likewise.
	(gimple_call_va_arg_pack_p): Likewise.
	(gimple_call_set_nothrow): Likewise.
	(gimple_call_set_alloca_for_var): Likewise.
	(gimple_call_alloca_for_var_p): Likewise.
	(gimple_call_copy_flags): Likewise.
	(gimple_cond_code): Likewise.
	(gimple_cond_set_code): Likewise.
	(gimple_cond_make_false): Likewise.
	(gimple_cond_make_true): Likewise.
	(gimple_asm_volatile_p): Likewise.
	(gimple_asm_set_volatile): Likewise.
	(gimple_asm_set_input): Likewise.
	(gimple_asm_input_p): Likewise.
	(gimple_try_kind): Likewise.
	(gimple_try_set_kind): Likewise.
	(gimple_try_catch_is_cleanup): Likewise.
	(gimple_try_set_catch_is_cleanup): Likewise.
	(gimple_wce_cleanup_eh_only): Likewise.
	(gimple_wce_set_cleanup_eh_only): Likewise.
	(gimple_debug_bind_p): Likewise.
	(gimple_debug_source_bind_p): Likewise.
	(gimple_transaction_subcode): Likewise.
	(gimple_transaction_set_subcode): Likewise.
	(gimple_predict_predictor): Likewise.
	(gimple_predict_set_predictor): Likewise.
	(gimple_predict_outcome): Likewise.
	(gimple_predict_set_outcome): Likewise.
	(gsi_one_before_end_p): Likewise.
	(gsi_next): Likewise.
	(gsi_prev): Likewise.
	(gimple_transaction_set_label): Likewise.
	(gimple_transaction_set_body): Likewise.
	(gimple_transaction_label_ptr): Likewise.
	(gimple_transaction_label): Likewise.
	(gimple_transaction_body_ptr): Likewise.
	(gimple_omp_continue_set_control_use): Likewise.
	(gimple_omp_continue_control_use_ptr): Likewise.
	(gimple_omp_continue_control_use): Likewise.
	(gimple_omp_continue_set_control_def): Likewise.
	(gimple_omp_continue_control_def_ptr): Likewise.
	(gimple_omp_continue_control_def): Likewise.
	(gimple_omp_atomic_load_rhs_ptr): Likewise.
	(gimple_omp_atomic_load_rhs): Likewise.
	(gimple_omp_atomic_load_set_rhs): Likewise.
	(gimple_omp_atomic_load_lhs_ptr): Likewise.
	(gimple_omp_atomic_load_lhs): Likewise.
	(gimple_omp_atomic_load_set_lhs): Likewise.
	(gimple_omp_atomic_store_val_ptr): Likewise.
	(gimple_omp_atomic_store_val): Likewise.
	(gimple_omp_atomic_store_set_val): Likewise.
	(gimple_omp_for_cond): Likewise.
	(gimple_omp_for_set_cond): Likewise.
	(gimple_omp_sections_set_control): Likewise.
	(gimple_omp_sections_control_ptr): Likewise.
	(gimple_omp_sections_control): Likewise.
	(gimple_omp_sections_set_clauses): Likewise.
	(gimple_omp_sections_clauses_ptr): Likewise.
	(gimple_omp_sections_clauses): Likewise.
	(gimple_omp_single_set_clauses): Likewise.
	(gimple_omp_single_clauses_ptr): Likewise.
	(gimple_omp_single_clauses): Likewise.
	(gimple_omp_task_set_arg_align): Likewise.
	(gimple_omp_task_arg_align_ptr): Likewise.
	(gimple_omp_task_arg_align): Likewise.
	(gimple_omp_task_set_arg_size): Likewise.
	(gimple_omp_task_arg_size_ptr): Likewise.
	(gimple_omp_task_arg_size): Likewise.
	(gimple_omp_task_set_copy_fn): Likewise.
	(gimple_omp_task_copy_fn_ptr): Likewise.
	(gimple_omp_task_copy_fn): Likewise.
	(gimple_omp_task_set_data_arg): Likewise.
	(gimple_omp_task_data_arg_ptr): Likewise.
	(gimple_omp_task_data_arg): Likewise.
	(gimple_omp_task_set_child_fn): Likewise.
	(gimple_omp_task_child_fn_ptr): Likewise.
	(gimple_omp_task_child_fn): Likewise.
	(gimple_omp_task_set_clauses): Likewise.
	(gimple_omp_task_clauses_ptr): Likewise.
	(gimple_omp_task_clauses): Likewise.
	(gimple_omp_parallel_set_data_arg): Likewise.
	(gimple_omp_parallel_data_arg_ptr): Likewise.
	(gimple_omp_parallel_data_arg): Likewise.
	(gimple_omp_parallel_set_child_fn): Likewise.
	(gimple_omp_parallel_child_fn_ptr): Likewise.
	(gimple_omp_parallel_child_fn): Likewise.
	(gimple_omp_parallel_set_clauses): Likewise.
	(gimple_omp_parallel_clauses_ptr): Likewise.
	(gimple_omp_parallel_clauses): Likewise.
	(gimple_omp_for_set_pre_body): Likewise.
	(gimple_omp_for_pre_body_ptr): Likewise.
	(gimple_omp_for_set_incr): Likewise.
	(gimple_omp_for_incr_ptr): Likewise.
	(gimple_omp_for_incr): Likewise.
	(gimple_omp_for_set_final): Likewise.
	(gimple_omp_for_final_ptr): Likewise.
	(gimple_omp_for_final): Likewise.
	(gimple_omp_for_set_initial): Likewise.
	(gimple_omp_for_initial_ptr): Likewise.
	(gimple_omp_for_initial): Likewise.
	(gimple_omp_for_set_index): Likewise.
	(gimple_omp_for_index_ptr): Likewise.
	(gimple_omp_for_index): Likewise.
	(gimple_omp_for_collapse): Likewise.
	(gimple_omp_for_set_clauses): Likewise.
	(gimple_omp_for_clauses_ptr): Likewise.
	(gimple_omp_for_clauses): Likewise.
	(gimple_omp_for_set_kind): Likewise.
	(gimple_omp_critical_set_name): Likewise.
	(gimple_omp_critical_name_ptr): Likewise.
	(gimple_omp_critical_name): Likewise.
	(gimple_eh_dispatch_set_region): Likewise.
	(gimple_eh_dispatch_region): Likewise.
	(gimple_resx_set_region): Likewise.
	(gimple_resx_region): Likewise.
	(gimple_phi_set_arg): Likewise.
	(gimple_phi_arg): Likewise.
	(gimple_phi_set_result): Likewise.
	(gimple_phi_result_ptr): Likewise.
	(gimple_phi_result): Likewise.
	(gimple_phi_num_args): Likewise.
	(gimple_phi_capacity): Likewise.
	(gimple_wce_set_cleanup): Likewise.
	(gimple_wce_cleanup_ptr): Likewise.
	(gimple_try_set_cleanup): Likewise.
	(gimple_try_set_eval): Likewise.
	(gimple_try_cleanup_ptr): Likewise.
	(gimple_try_eval_ptr): Likewise.
	(gimple_eh_else_set_e_body): Likewise.
	(gimple_eh_else_set_n_body): Likewise.
	(gimple_eh_else_e_body_ptr): Likewise.
	(gimple_eh_else_n_body_ptr): Likewise.
	(gimple_eh_must_not_throw_set_fndecl): Likewise.
	(gimple_eh_must_not_throw_fndecl): Likewise.
	(gimple_eh_filter_set_failure): Likewise.
	(gimple_eh_filter_set_types): Likewise.
	(gimple_eh_filter_failure_ptr): Likewise.
	(gimple_eh_filter_types_ptr): Likewise.
	(gimple_eh_filter_types): Likewise.
	(gimple_catch_set_handler): Likewise.
	(gimple_catch_set_types): Likewise.
	(gimple_catch_handler_ptr): Likewise.
	(gimple_catch_types_ptr): Likewise.
	(gimple_catch_types): Likewise.
	(gimple_asm_string): Likewise.
	(gimple_asm_set_label_op): Likewise.
	(gimple_asm_label_op): Likewise.
	(gimple_asm_set_clobber_op): Likewise.
	(gimple_asm_clobber_op): Likewise.
	(gimple_asm_set_output_op): Likewise.
	(gimple_asm_output_op_ptr): Likewise.
	(gimple_asm_output_op): Likewise.
	(gimple_asm_set_input_op): Likewise.
	(gimple_asm_input_op_ptr): Likewise.
	(gimple_asm_input_op): Likewise.
	(gimple_asm_nlabels): Likewise.
	(gimple_asm_nclobbers): Likewise.
	(gimple_asm_noutputs): Likewise.
	(gimple_asm_ninputs): Likewise.
	(gimple_bind_set_block): Likewise.
	(gimple_bind_block): Likewise.
	(gimple_bind_add_seq): Likewise.
	(gimple_bind_add_stmt): Likewise.
	(gimple_bind_set_body): Likewise.
	(gimple_bind_body_ptr): Likewise.
	(gimple_bind_append_vars): Likewise.
	(gimple_bind_set_vars): Likewise.
	(gimple_bind_vars): Likewise.
	(gimple_call_clobber_set): Likewise.
	(gimple_call_use_set): Likewise.
	(gimple_call_set_internal_fn): Likewise.
	(gimple_call_set_fntype): Likewise.
	(gimple_call_fntype): Likewise.
	(gimple_omp_taskreg_set_data_arg): Likewise.
	(gimple_omp_taskreg_data_arg_ptr): Likewise.
	(gimple_omp_taskreg_data_arg): Likewise.
	(gimple_omp_taskreg_set_child_fn): Likewise.
	(gimple_omp_taskreg_child_fn_ptr): Likewise.
	(gimple_omp_taskreg_child_fn): Likewise.
	(gimple_omp_taskreg_set_clauses): Likewise.
	(gimple_omp_taskreg_clauses_ptr): Likewise.
	(gimple_omp_taskreg_clauses): Likewise.
	(gimple_vuse_op): Likewise.
	(gimple_vdef_op): Likewise.
	(gimple_vuse): Likewise.
	(gimple_vdef): Likewise.
	(gimple_vuse_ptr): Likewise.
	(gimple_vdef_ptr): Likewise.
	* tree-inline.c (copy_debug_stmt): Likewise.
	* tree-phinodes.c (make_phi_node): Likewise.
---
 gcc/gimple-iterator.c     |   72 +--
 gcc/gimple-pretty-print.c |    2 +-
 gcc/gimple-streamer-in.c  |    8 +-
 gcc/gimple-streamer-out.c |    2 +-
 gcc/gimple.c              |   16 +-
 gcc/gimple.h              | 1298 ++++++++++++++++++++++++++++++---------------
 gcc/tree-inline.c         |    2 +-
 gcc/tree-phinodes.c       |    2 +-
 8 files changed, 914 insertions(+), 488 deletions(-)

diff --git a/gcc/gimple-iterator.c b/gcc/gimple-iterator.c
index 0b0151f..698b85f 100644
--- a/gcc/gimple-iterator.c
+++ b/gcc/gimple-iterator.c
@@ -62,7 +62,7 @@ update_bb_for_stmts (gimple_seq_node first, gimple_seq_node last,
 {
   gimple_seq_node n;
 
-  for (n = first; n; n = n->gsbase.next)
+  for (n = first; n; n = n->next)
     {
       gimple_set_bb (n, bb);
       if (n == last)
@@ -80,7 +80,7 @@ update_call_edge_frequencies (gimple_seq_node first, basic_block bb)
   int bb_freq = 0;
   gimple_seq_node n;
 
-  for (n = first; n ; n = n->gsbase.next)
+  for (n = first; n ; n = n->next)
     if (is_gimple_call (n))
       {
 	struct cgraph_edge *e;
@@ -118,7 +118,7 @@ gsi_insert_seq_nodes_before (gimple_stmt_iterator *i,
   basic_block bb;
   gimple_seq_node cur = i->ptr;
 
-  gcc_assert (!cur || cur->gsbase.prev);
+  gcc_assert (!cur || cur->prev);
 
   if ((bb = gsi_bb (*i)) != NULL)
     update_bb_for_stmts (first, last, bb);
@@ -126,13 +126,13 @@ gsi_insert_seq_nodes_before (gimple_stmt_iterator *i,
   /* Link SEQ before CUR in the sequence.  */
   if (cur)
     {
-      first->gsbase.prev = cur->gsbase.prev;
-      if (first->gsbase.prev->gsbase.next)
-	first->gsbase.prev->gsbase.next = first;
+      first->prev = cur->prev;
+      if (first->prev->next)
+	first->prev->next = first;
       else
 	gimple_seq_set_first (i->seq, first);
-      last->gsbase.next = cur;
-      cur->gsbase.prev = last;
+      last->next = cur;
+      cur->prev = last;
     }
   else
     {
@@ -143,11 +143,11 @@ gsi_insert_seq_nodes_before (gimple_stmt_iterator *i,
 	 labels, so it returns an iterator after the end of the block, and
 	 we need to insert before it; it might be cleaner to add a flag to the
 	 iterator saying whether we are at the start or end of the list).  */
-      last->gsbase.next = NULL;
+      last->next = NULL;
       if (itlast)
 	{
-	  first->gsbase.prev = itlast;
-	  itlast->gsbase.next = first;
+	  first->prev = itlast;
+	  itlast->next = first;
 	}
       else
 	gimple_seq_set_first (i->seq, first);
@@ -236,7 +236,7 @@ gsi_insert_seq_nodes_after (gimple_stmt_iterator *i,
   basic_block bb;
   gimple_seq_node cur = i->ptr;
 
-  gcc_assert (!cur || cur->gsbase.prev);
+  gcc_assert (!cur || cur->prev);
 
   /* If the iterator is inside a basic block, we need to update the
      basic block information for all the nodes between FIRST and LAST.  */
@@ -246,20 +246,20 @@ gsi_insert_seq_nodes_after (gimple_stmt_iterator *i,
   /* Link SEQ after CUR.  */
   if (cur)
     {
-      last->gsbase.next = cur->gsbase.next;
-      if (last->gsbase.next)
+      last->next = cur->next;
+      if (last->next)
 	{
-	  last->gsbase.next->gsbase.prev = last;
+	  last->next->prev = last;
 	}
       else
 	gimple_seq_set_last (i->seq, last);
-      first->gsbase.prev = cur;
-      cur->gsbase.next = first;
+      first->prev = cur;
+      cur->next = first;
     }
   else
     {
       gcc_assert (!gimple_seq_last (*i->seq));
-      last->gsbase.next = NULL;
+      last->next = NULL;
       gimple_seq_set_first (i->seq, first);
       gimple_seq_set_last (i->seq, last);
     }
@@ -341,15 +341,15 @@ gsi_split_seq_after (gimple_stmt_iterator i)
   cur = i.ptr;
 
   /* How can we possibly split after the end, or before the beginning?  */
-  gcc_assert (cur && cur->gsbase.next);
-  next = cur->gsbase.next;
+  gcc_assert (cur && cur->next);
+  next = cur->next;
 
   pold_seq = i.seq;
 
   gimple_seq_set_first (&new_seq, next);
   gimple_seq_set_last (&new_seq, gimple_seq_last (*pold_seq));
   gimple_seq_set_last (pold_seq, cur);
-  cur->gsbase.next = NULL;
+  cur->next = NULL;
 
   return new_seq;
 }
@@ -365,17 +365,17 @@ gsi_set_stmt (gimple_stmt_iterator *gsi, gimple stmt)
   gimple orig_stmt = gsi_stmt (*gsi);
   gimple prev, next;
 
-  stmt->gsbase.next = next = orig_stmt->gsbase.next;
-  stmt->gsbase.prev = prev = orig_stmt->gsbase.prev;
+  stmt->next = next = orig_stmt->next;
+  stmt->prev = prev = orig_stmt->prev;
   /* Note how we don't clear next/prev of orig_stmt.  This is so that
      copies of *GSI our callers might still hold (to orig_stmt)
      can be advanced as if they too were replaced.  */
-  if (prev->gsbase.next)
-    prev->gsbase.next = stmt;
+  if (prev->next)
+    prev->next = stmt;
   else
     gimple_seq_set_first (gsi->seq, stmt);
   if (next)
-    next->gsbase.prev = stmt;
+    next->prev = stmt;
   else
     gimple_seq_set_last (gsi->seq, stmt);
 
@@ -396,10 +396,10 @@ gsi_split_seq_before (gimple_stmt_iterator *i, gimple_seq *pnew_seq)
 
   /* How can we possibly split after the end?  */
   gcc_assert (cur);
-  prev = cur->gsbase.prev;
+  prev = cur->prev;
 
   old_seq = *i->seq;
-  if (!prev->gsbase.next)
+  if (!prev->next)
     *i->seq = NULL;
   i->seq = pnew_seq;
 
@@ -409,8 +409,8 @@ gsi_split_seq_before (gimple_stmt_iterator *i, gimple_seq *pnew_seq)
 
   /* Cut OLD_SEQ before I.  */
   gimple_seq_set_last (&old_seq, prev);
-  if (prev->gsbase.next)
-    prev->gsbase.next = NULL;
+  if (prev->next)
+    prev->next = NULL;
 }
 
 
@@ -570,20 +570,20 @@ gsi_remove (gimple_stmt_iterator *i, bool remove_permanently)
 
   /* Update the iterator and re-wire the links in I->SEQ.  */
   cur = i->ptr;
-  next = cur->gsbase.next;
-  prev = cur->gsbase.prev;
+  next = cur->next;
+  prev = cur->prev;
   /* See gsi_set_stmt for why we don't reset prev/next of STMT.  */
 
   if (next)
     /* Cur is not last.  */
-    next->gsbase.prev = prev;
-  else if (prev->gsbase.next)
+    next->prev = prev;
+  else if (prev->next)
     /* Cur is last but not first.  */
     gimple_seq_set_last (i->seq, prev);
 
-  if (prev->gsbase.next)
+  if (prev->next)
     /* Cur is not first.  */
-    prev->gsbase.next = next;
+    prev->next = next;
   else
     /* Cur is first.  */
     *i->seq = next;
diff --git a/gcc/gimple-pretty-print.c b/gcc/gimple-pretty-print.c
index 8fed925..40ec132 100644
--- a/gcc/gimple-pretty-print.c
+++ b/gcc/gimple-pretty-print.c
@@ -1051,7 +1051,7 @@ dump_gimple_eh_dispatch (pretty_printer *buffer, gimple gs, int spc, int flags)
 static void
 dump_gimple_debug (pretty_printer *buffer, gimple gs, int spc, int flags)
 {
-  switch (gs->gsbase.subcode)
+  switch (gs->subcode)
     {
     case GIMPLE_DEBUG_BIND:
       if (flags & TDF_RAW)
diff --git a/gcc/gimple-streamer-in.c b/gcc/gimple-streamer-in.c
index 03fbe91..fc0b20a 100644
--- a/gcc/gimple-streamer-in.c
+++ b/gcc/gimple-streamer-in.c
@@ -95,12 +95,12 @@ input_gimple_stmt (struct lto_input_block *ib, struct data_in *data_in,
   bp = streamer_read_bitpack (ib);
   num_ops = bp_unpack_var_len_unsigned (&bp);
   stmt = gimple_alloc (code, num_ops);
-  stmt->gsbase.no_warning = bp_unpack_value (&bp, 1);
+  stmt->no_warning = bp_unpack_value (&bp, 1);
   if (is_gimple_assign (stmt))
-    stmt->gsbase.nontemporal_move = bp_unpack_value (&bp, 1);
-  stmt->gsbase.has_volatile_ops = bp_unpack_value (&bp, 1);
+    stmt->nontemporal_move = bp_unpack_value (&bp, 1);
+  stmt->has_volatile_ops = bp_unpack_value (&bp, 1);
   has_hist = bp_unpack_value (&bp, 1);
-  stmt->gsbase.subcode = bp_unpack_var_len_unsigned (&bp);
+  stmt->subcode = bp_unpack_var_len_unsigned (&bp);
 
   /* Read location information.  */
   gimple_set_location (stmt, stream_input_location (&bp, data_in));
diff --git a/gcc/gimple-streamer-out.c b/gcc/gimple-streamer-out.c
index 0b8d8c1..0e542f6 100644
--- a/gcc/gimple-streamer-out.c
+++ b/gcc/gimple-streamer-out.c
@@ -76,7 +76,7 @@ output_gimple_stmt (struct output_block *ob, gimple stmt)
   bp_pack_value (&bp, gimple_has_volatile_ops (stmt), 1);
   hist = gimple_histogram_value (cfun, stmt);
   bp_pack_value (&bp, hist != NULL, 1);
-  bp_pack_var_len_unsigned (&bp, stmt->gsbase.subcode);
+  bp_pack_var_len_unsigned (&bp, stmt->subcode);
 
   /* Emit location information for the statement.  */
   stream_output_location (ob, &bp, LOCATION_LOCUS (gimple_location (stmt)));
diff --git a/gcc/gimple.c b/gcc/gimple.c
index 953057c..aceb1b0 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -99,7 +99,7 @@ extern void gimple_set_loaded_syms (gimple, bitmap, bitmap_obstack *);
 static inline void
 gimple_set_code (gimple g, enum gimple_code code)
 {
-  g->gsbase.code = code;
+  g->code = code;
 }
 
 /* Return the number of bytes needed to hold a GIMPLE statement with
@@ -137,7 +137,7 @@ gimple_alloc_stat (enum gimple_code code, unsigned num_ops MEM_STAT_DECL)
 
   /* Do not call gimple_set_modified here as it has other side
      effects and this tuple is still not completely built.  */
-  stmt->gsbase.modified = 1;
+  stmt->modified = 1;
   gimple_init_singleton (stmt);
 
   return stmt;
@@ -151,7 +151,7 @@ gimple_set_subcode (gimple g, unsigned subcode)
   /* We only have 16 bits for the RHS code.  Assert that we are not
      overflowing it.  */
   gcc_assert (subcode < (1 << 16));
-  g->gsbase.subcode = subcode;
+  g->subcode = subcode;
 }
 
 
@@ -286,7 +286,7 @@ static inline gimple
 gimple_build_call_internal_1 (enum internal_fn fn, unsigned nargs)
 {
   gimple s = gimple_build_with_ops (GIMPLE_CALL, ERROR_MARK, nargs + 3);
-  s->gsbase.subcode |= GF_CALL_INTERNAL;
+  s->subcode |= GF_CALL_INTERNAL;
   gimple_call_set_internal_fn (s, fn);
   gimple_call_reset_alias_info (s);
   return s;
@@ -1156,8 +1156,8 @@ gimple_check_failed (const_gimple gs, const char *file, int line,
       		  gimple_code_name[code],
 		  tree_code_name[subcode],
 		  gimple_code_name[gimple_code (gs)],
-		  gs->gsbase.subcode > 0
-		    ? tree_code_name[gs->gsbase.subcode]
+		  gs->subcode > 0
+		    ? tree_code_name[gs->subcode]
 		    : "",
 		  function, trim_filename (file), line);
 }
@@ -1886,7 +1886,7 @@ gimple_call_flags (const_gimple stmt)
   else
     flags = flags_from_decl_or_type (gimple_call_fntype (stmt));
 
-  if (stmt->gsbase.subcode & GF_CALL_NOTHROW)
+  if (stmt->subcode & GF_CALL_NOTHROW)
     flags |= ECF_NOTHROW;
 
   return flags;
@@ -2027,7 +2027,7 @@ gimple_assign_unary_nop_p (gimple gs)
 void
 gimple_set_bb (gimple stmt, basic_block bb)
 {
-  stmt->gsbase.bb = bb;
+  stmt->bb = bb;
 
   /* If the statement is a label, add the label to block-to-labels map
      so that we can speed up edge creation for GIMPLE_GOTOs.  */
diff --git a/gcc/gimple.h b/gcc/gimple.h
index 1ee6238..43573a1 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -688,6 +688,310 @@ enum gimple_statement_structure_enum {
 };
 #undef DEFGSSTRUCT
 
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_asm>::test (gimple gs)
+{
+  return gs->code == GIMPLE_ASM;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_bind>::test (gimple gs)
+{
+  return gs->code == GIMPLE_BIND;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_call>::test (gimple gs)
+{
+  return gs->code == GIMPLE_CALL;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_catch>::test (gimple gs)
+{
+  return gs->code == GIMPLE_CATCH;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_eh_ctrl>::test (gimple gs)
+{
+  return gs->code == GIMPLE_RESX|| gs->code == GIMPLE_EH_DISPATCH;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_eh_else>::test (gimple gs)
+{
+  return gs->code == GIMPLE_EH_ELSE;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_eh_filter>::test (gimple gs)
+{
+  return gs->code == GIMPLE_EH_FILTER;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_eh_mnt>::test (gimple gs)
+{
+  return gs->code == GIMPLE_EH_MUST_NOT_THROW;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_omp_atomic_load>::test (gimple gs)
+{
+  return gs->code == GIMPLE_OMP_ATOMIC_LOAD;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_omp_atomic_store>::test (gimple gs)
+{
+  return gs->code == GIMPLE_OMP_ATOMIC_STORE;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_omp_continue>::test (gimple gs)
+{
+  return gs->code == GIMPLE_OMP_CONTINUE;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_omp_critical>::test (gimple gs)
+{
+  return gs->code == GIMPLE_OMP_CRITICAL;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_omp_for>::test (gimple gs)
+{
+  return gs->code == GIMPLE_OMP_FOR;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_omp_parallel>::test (gimple gs)
+{
+  return gs->code == GIMPLE_OMP_PARALLEL;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_omp_sections>::test (gimple gs)
+{
+  return gs->code == GIMPLE_OMP_SECTIONS;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_omp_single>::test (gimple gs)
+{
+  return gs->code == GIMPLE_OMP_SINGLE;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_omp_task>::test (gimple gs)
+{
+  return gs->code == GIMPLE_OMP_TASK;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_phi>::test (gimple gs)
+{
+  return gs->code == GIMPLE_PHI;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_transaction>::test (gimple gs)
+{
+  return gs->code == GIMPLE_TRANSACTION;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_try>::test (gimple gs)
+{
+  return gs->code == GIMPLE_TRY;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_wce>::test (gimple gs)
+{
+  return gs->code == GIMPLE_WITH_CLEANUP_EXPR;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_asm>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_ASM;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_bind>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_BIND;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_call>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_CALL;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_catch>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_CATCH;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_eh_ctrl>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_RESX|| gs->code == GIMPLE_EH_DISPATCH;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_eh_filter>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_EH_FILTER;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_omp_atomic_load>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_OMP_ATOMIC_LOAD;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_omp_atomic_store>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_OMP_ATOMIC_STORE;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_omp_continue>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_OMP_CONTINUE;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_omp_critical>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_OMP_CRITICAL;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_omp_for>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_OMP_FOR;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_omp_parallel>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_OMP_PARALLEL;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_omp_sections>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_OMP_SECTIONS;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_omp_single>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_OMP_SINGLE;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_omp_task>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_OMP_TASK;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_phi>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_PHI;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_transaction>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_TRANSACTION;
+}
+
 
 /* In gimple.c.  */
 
@@ -1090,7 +1394,7 @@ gimple_seq_first_stmt (gimple_seq s)
 static inline gimple_seq_node
 gimple_seq_last (gimple_seq s)
 {
-  return s ? s->gsbase.prev : NULL;
+  return s ? s->prev : NULL;
 }
 
 
@@ -1109,7 +1413,7 @@ gimple_seq_last_stmt (gimple_seq s)
 static inline void
 gimple_seq_set_last (gimple_seq *ps, gimple_seq_node last)
 {
-  (*ps)->gsbase.prev = last;
+  (*ps)->prev = last;
 }
 
 
@@ -1179,7 +1483,7 @@ set_bb_seq (basic_block bb, gimple_seq seq)
 static inline enum gimple_code
 gimple_code (const_gimple g)
 {
-  return g->gsbase.code;
+  return g->code;
 }
 
 
@@ -1239,7 +1543,7 @@ gimple_has_substatements (gimple g)
 static inline basic_block
 gimple_bb (const_gimple g)
 {
-  return g->gsbase.bb;
+  return g->bb;
 }
 
 
@@ -1248,7 +1552,7 @@ gimple_bb (const_gimple g)
 static inline tree
 gimple_block (const_gimple g)
 {
-  return LOCATION_BLOCK (g->gsbase.location);
+  return LOCATION_BLOCK (g->location);
 }
 
 
@@ -1258,10 +1562,10 @@ static inline void
 gimple_set_block (gimple g, tree block)
 {
   if (block)
-    g->gsbase.location =
-	COMBINE_LOCATION_DATA (line_table, g->gsbase.location, block);
+    g->location =
+	COMBINE_LOCATION_DATA (line_table, g->location, block);
   else
-    g->gsbase.location = LOCATION_LOCUS (g->gsbase.location);
+    g->location = LOCATION_LOCUS (g->location);
 }
 
 
@@ -1270,7 +1574,7 @@ gimple_set_block (gimple g, tree block)
 static inline location_t
 gimple_location (const_gimple g)
 {
-  return g->gsbase.location;
+  return g->location;
 }
 
 /* Return pointer to location information for statement G.  */
@@ -1278,7 +1582,7 @@ gimple_location (const_gimple g)
 static inline const location_t *
 gimple_location_ptr (const_gimple g)
 {
-  return &g->gsbase.location;
+  return &g->location;
 }
 
 
@@ -1287,7 +1591,7 @@ gimple_location_ptr (const_gimple g)
 static inline void
 gimple_set_location (gimple g, location_t location)
 {
-  g->gsbase.location = location;
+  g->location = location;
 }
 
 
@@ -1332,7 +1636,7 @@ gimple_seq_singleton_p (gimple_seq seq)
 static inline bool
 gimple_no_warning_p (const_gimple stmt)
 {
-  return stmt->gsbase.no_warning;
+  return stmt->no_warning;
 }
 
 /* Set the no_warning flag of STMT to NO_WARNING.  */
@@ -1340,7 +1644,7 @@ gimple_no_warning_p (const_gimple stmt)
 static inline void
 gimple_set_no_warning (gimple stmt, bool no_warning)
 {
-  stmt->gsbase.no_warning = (unsigned) no_warning;
+  stmt->no_warning = (unsigned) no_warning;
 }
 
 /* Set the visited status on statement STMT to VISITED_P.  */
@@ -1348,7 +1652,7 @@ gimple_set_no_warning (gimple stmt, bool no_warning)
 static inline void
 gimple_set_visited (gimple stmt, bool visited_p)
 {
-  stmt->gsbase.visited = (unsigned) visited_p;
+  stmt->visited = (unsigned) visited_p;
 }
 
 
@@ -1357,7 +1661,7 @@ gimple_set_visited (gimple stmt, bool visited_p)
 static inline bool
 gimple_visited_p (gimple stmt)
 {
-  return stmt->gsbase.visited;
+  return stmt->visited;
 }
 
 
@@ -1367,9 +1671,9 @@ static inline void
 gimple_set_plf (gimple stmt, enum plf_mask plf, bool val_p)
 {
   if (val_p)
-    stmt->gsbase.plf |= (unsigned int) plf;
+    stmt->plf |= (unsigned int) plf;
   else
-    stmt->gsbase.plf &= ~((unsigned int) plf);
+    stmt->plf &= ~((unsigned int) plf);
 }
 
 
@@ -1378,7 +1682,7 @@ gimple_set_plf (gimple stmt, enum plf_mask plf, bool val_p)
 static inline unsigned int
 gimple_plf (gimple stmt, enum plf_mask plf)
 {
-  return stmt->gsbase.plf & ((unsigned int) plf);
+  return stmt->plf & ((unsigned int) plf);
 }
 
 
@@ -1387,7 +1691,7 @@ gimple_plf (gimple stmt, enum plf_mask plf)
 static inline void
 gimple_set_uid (gimple g, unsigned uid)
 {
-  g->gsbase.uid = uid;
+  g->uid = uid;
 }
 
 
@@ -1396,7 +1700,7 @@ gimple_set_uid (gimple g, unsigned uid)
 static inline unsigned
 gimple_uid (const_gimple g)
 {
-  return g->gsbase.uid;
+  return g->uid;
 }
 
 
@@ -1405,8 +1709,8 @@ gimple_uid (const_gimple g)
 static inline void
 gimple_init_singleton (gimple g)
 {
-  g->gsbase.next = NULL;
-  g->gsbase.prev = g;
+  g->next = NULL;
+  g->prev = g;
 }
 
 
@@ -1458,11 +1762,13 @@ static inline use_operand_p
 gimple_vuse_op (const_gimple g)
 {
   struct use_optype_d *ops;
-  if (!gimple_has_mem_ops (g))
+  const gimple_statement_with_memory_ops *mem_ops_stmt =
+     dyn_cast <const gimple_statement_with_memory_ops> (g);
+  if (!mem_ops_stmt)
     return NULL_USE_OPERAND_P;
-  ops = g->gsops.opbase.use_ops;
+  ops = mem_ops_stmt->use_ops;
   if (ops
-      && USE_OP_PTR (ops)->use == &g->gsmembase.vuse)
+      && USE_OP_PTR (ops)->use == &mem_ops_stmt->vuse)
     return USE_OP_PTR (ops);
   return NULL_USE_OPERAND_P;
 }
@@ -1472,10 +1778,12 @@ gimple_vuse_op (const_gimple g)
 static inline def_operand_p
 gimple_vdef_op (gimple g)
 {
-  if (!gimple_has_mem_ops (g))
+  gimple_statement_with_memory_ops *mem_ops_stmt =
+     dyn_cast <gimple_statement_with_memory_ops> (g);
+  if (!mem_ops_stmt)
     return NULL_DEF_OPERAND_P;
-  if (g->gsmembase.vdef)
-    return &g->gsmembase.vdef;
+  if (mem_ops_stmt->vdef)
+    return &mem_ops_stmt->vdef;
   return NULL_DEF_OPERAND_P;
 }
 
@@ -1485,9 +1793,11 @@ gimple_vdef_op (gimple g)
 static inline tree
 gimple_vuse (const_gimple g)
 {
-  if (!gimple_has_mem_ops (g))
+  const gimple_statement_with_memory_ops *mem_ops_stmt =
+     dyn_cast <const gimple_statement_with_memory_ops> (g);
+  if (!mem_ops_stmt)
     return NULL_TREE;
-  return g->gsmembase.vuse;
+  return mem_ops_stmt->vuse;
 }
 
 /* Return the single VDEF operand of the statement G.  */
@@ -1495,9 +1805,11 @@ gimple_vuse (const_gimple g)
 static inline tree
 gimple_vdef (const_gimple g)
 {
-  if (!gimple_has_mem_ops (g))
+  const gimple_statement_with_memory_ops *mem_ops_stmt =
+     dyn_cast <const gimple_statement_with_memory_ops> (g);
+  if (!mem_ops_stmt)
     return NULL_TREE;
-  return g->gsmembase.vdef;
+  return mem_ops_stmt->vdef;
 }
 
 /* Return the single VUSE operand of the statement G.  */
@@ -1505,9 +1817,11 @@ gimple_vdef (const_gimple g)
 static inline tree *
 gimple_vuse_ptr (gimple g)
 {
-  if (!gimple_has_mem_ops (g))
+  gimple_statement_with_memory_ops *mem_ops_stmt =
+     dyn_cast <gimple_statement_with_memory_ops> (g);
+  if (!mem_ops_stmt)
     return NULL;
-  return &g->gsmembase.vuse;
+  return &mem_ops_stmt->vuse;
 }
 
 /* Return the single VDEF operand of the statement G.  */
@@ -1515,9 +1829,11 @@ gimple_vuse_ptr (gimple g)
 static inline tree *
 gimple_vdef_ptr (gimple g)
 {
-  if (!gimple_has_mem_ops (g))
+  gimple_statement_with_memory_ops *mem_ops_stmt =
+     dyn_cast <gimple_statement_with_memory_ops> (g);
+  if (!mem_ops_stmt)
     return NULL;
-  return &g->gsmembase.vdef;
+  return &mem_ops_stmt->vdef;
 }
 
 /* Set the single VUSE operand of the statement G.  */
@@ -1547,7 +1863,7 @@ gimple_set_vdef (gimple g, tree vdef)
 static inline bool
 gimple_modified_p (const_gimple g)
 {
-  return (gimple_has_ops (g)) ? (bool) g->gsbase.modified : false;
+  return (gimple_has_ops (g)) ? (bool) g->modified : false;
 }
 
 
@@ -1558,7 +1874,7 @@ static inline void
 gimple_set_modified (gimple s, bool modifiedp)
 {
   if (gimple_has_ops (s))
-    s->gsbase.modified = (unsigned) modifiedp;
+    s->modified = (unsigned) modifiedp;
 }
 
 
@@ -1573,7 +1889,7 @@ gimple_expr_code (const_gimple stmt)
 {
   enum gimple_code code = gimple_code (stmt);
   if (code == GIMPLE_ASSIGN || code == GIMPLE_COND)
-    return (enum tree_code) stmt->gsbase.subcode;
+    return (enum tree_code) stmt->subcode;
   else
     {
       gcc_gimple_checking_assert (code == GIMPLE_CALL);
@@ -1609,7 +1925,7 @@ static inline bool
 gimple_has_volatile_ops (const_gimple stmt)
 {
   if (gimple_has_mem_ops (stmt))
-    return stmt->gsbase.has_volatile_ops;
+    return stmt->has_volatile_ops;
   else
     return false;
 }
@@ -1621,7 +1937,7 @@ static inline void
 gimple_set_has_volatile_ops (gimple stmt, bool volatilep)
 {
   if (gimple_has_mem_ops (stmt))
-    stmt->gsbase.has_volatile_ops = (unsigned) volatilep;
+    stmt->has_volatile_ops = (unsigned) volatilep;
 }
 
 /* Return true if BB is in a transaction.  */
@@ -1656,7 +1972,7 @@ gimple_omp_subcode (const_gimple s)
 {
   gcc_gimple_checking_assert (gimple_code (s) >= GIMPLE_OMP_ATOMIC_LOAD
 	      && gimple_code (s) <= GIMPLE_OMP_SINGLE);
-  return s->gsbase.subcode;
+  return s->subcode;
 }
 
 /* Set the subcode for OMP statement S to SUBCODE.  */
@@ -1667,7 +1983,7 @@ gimple_omp_set_subcode (gimple s, unsigned int subcode)
   /* We only have 16 bits for the subcode.  Assert that we are not
      overflowing it.  */
   gcc_gimple_checking_assert (subcode < (1 << 16));
-  s->gsbase.subcode = subcode;
+  s->subcode = subcode;
 }
 
 /* Set the nowait flag on OMP_RETURN statement S.  */
@@ -1676,7 +1992,7 @@ static inline void
 gimple_omp_return_set_nowait (gimple s)
 {
   GIMPLE_CHECK (s, GIMPLE_OMP_RETURN);
-  s->gsbase.subcode |= GF_OMP_RETURN_NOWAIT;
+  s->subcode |= GF_OMP_RETURN_NOWAIT;
 }
 
 
@@ -1708,7 +2024,7 @@ static inline void
 gimple_omp_section_set_last (gimple g)
 {
   GIMPLE_CHECK (g, GIMPLE_OMP_SECTION);
-  g->gsbase.subcode |= GF_OMP_SECTION_LAST;
+  g->subcode |= GF_OMP_SECTION_LAST;
 }
 
 
@@ -1731,9 +2047,9 @@ gimple_omp_parallel_set_combined_p (gimple g, bool combined_p)
 {
   GIMPLE_CHECK (g, GIMPLE_OMP_PARALLEL);
   if (combined_p)
-    g->gsbase.subcode |= GF_OMP_PARALLEL_COMBINED;
+    g->subcode |= GF_OMP_PARALLEL_COMBINED;
   else
-    g->gsbase.subcode &= ~GF_OMP_PARALLEL_COMBINED;
+    g->subcode &= ~GF_OMP_PARALLEL_COMBINED;
 }
 
 
@@ -1756,7 +2072,7 @@ gimple_omp_atomic_set_need_value (gimple g)
 {
   if (gimple_code (g) != GIMPLE_OMP_ATOMIC_LOAD)
     GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
-  g->gsbase.subcode |= GF_OMP_ATOMIC_NEED_VALUE;
+  g->subcode |= GF_OMP_ATOMIC_NEED_VALUE;
 }
 
 
@@ -1765,7 +2081,7 @@ gimple_omp_atomic_set_need_value (gimple g)
 static inline unsigned
 gimple_num_ops (const_gimple gs)
 {
-  return gs->gsbase.num_ops;
+  return gs->num_ops;
 }
 
 
@@ -1774,7 +2090,7 @@ gimple_num_ops (const_gimple gs)
 static inline void
 gimple_set_num_ops (gimple gs, unsigned num_ops)
 {
-  gs->gsbase.num_ops = num_ops;
+  gs->num_ops = num_ops;
 }
 
 
@@ -2017,7 +2333,7 @@ static inline bool
 gimple_assign_nontemporal_move_p (const_gimple gs)
 {
   GIMPLE_CHECK (gs, GIMPLE_ASSIGN);
-  return gs->gsbase.nontemporal_move;
+  return gs->nontemporal_move;
 }
 
 /* Sets nontemporal move flag of GS to NONTEMPORAL.  */
@@ -2026,7 +2342,7 @@ static inline void
 gimple_assign_set_nontemporal_move (gimple gs, bool nontemporal)
 {
   GIMPLE_CHECK (gs, GIMPLE_ASSIGN);
-  gs->gsbase.nontemporal_move = nontemporal;
+  gs->nontemporal_move = nontemporal;
 }
 
 
@@ -2040,7 +2356,7 @@ gimple_assign_rhs_code (const_gimple gs)
   enum tree_code code;
   GIMPLE_CHECK (gs, GIMPLE_ASSIGN);
 
-  code = (enum tree_code) gs->gsbase.subcode;
+  code = (enum tree_code) gs->subcode;
   /* While we initially set subcode to the TREE_CODE of the rhs for
      GIMPLE_SINGLE_RHS assigns we do not update that subcode to stay
      in sync when we rewrite stmts into SSA form or do SSA propagations.  */
@@ -2058,7 +2374,7 @@ static inline void
 gimple_assign_set_rhs_code (gimple s, enum tree_code code)
 {
   GIMPLE_CHECK (s, GIMPLE_ASSIGN);
-  s->gsbase.subcode = code;
+  s->subcode = code;
 }
 
 
@@ -2183,7 +2499,7 @@ static inline bool
 gimple_call_internal_p (const_gimple gs)
 {
   GIMPLE_CHECK (gs, GIMPLE_CALL);
-  return (gs->gsbase.subcode & GF_CALL_INTERNAL) != 0;
+  return (gs->subcode & GF_CALL_INTERNAL) != 0;
 }
 
 
@@ -2202,10 +2518,11 @@ gimple_call_internal_fn (const_gimple gs)
 static inline tree
 gimple_call_fntype (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_CALL);
+  const gimple_statement_call *call_stmt =
+    as_a <const gimple_statement_call> (gs);
   if (gimple_call_internal_p (gs))
     return NULL_TREE;
-  return gs->gimple_call.u.fntype;
+  return call_stmt->u.fntype;
 }
 
 /* Set the type of the function called by GS to FNTYPE.  */
@@ -2213,9 +2530,9 @@ gimple_call_fntype (const_gimple gs)
 static inline void
 gimple_call_set_fntype (gimple gs, tree fntype)
 {
-  GIMPLE_CHECK (gs, GIMPLE_CALL);
+  gimple_statement_call *call_stmt = as_a <gimple_statement_call> (gs);
   gcc_gimple_checking_assert (!gimple_call_internal_p (gs));
-  gs->gimple_call.u.fntype = fntype;
+  call_stmt->u.fntype = fntype;
 }
 
 
@@ -2267,9 +2584,9 @@ gimple_call_set_fndecl (gimple gs, tree decl)
 static inline void
 gimple_call_set_internal_fn (gimple gs, enum internal_fn fn)
 {
-  GIMPLE_CHECK (gs, GIMPLE_CALL);
+  gimple_statement_call *call_stmt = as_a <gimple_statement_call> (gs);
   gcc_gimple_checking_assert (gimple_call_internal_p (gs));
-  gs->gimple_call.u.internal_fn = fn;
+  call_stmt->u.internal_fn = fn;
 }
 
 
@@ -2401,9 +2718,9 @@ gimple_call_set_tail (gimple s, bool tail_p)
 {
   GIMPLE_CHECK (s, GIMPLE_CALL);
   if (tail_p)
-    s->gsbase.subcode |= GF_CALL_TAILCALL;
+    s->subcode |= GF_CALL_TAILCALL;
   else
-    s->gsbase.subcode &= ~GF_CALL_TAILCALL;
+    s->subcode &= ~GF_CALL_TAILCALL;
 }
 
 
@@ -2413,7 +2730,7 @@ static inline bool
 gimple_call_tail_p (gimple s)
 {
   GIMPLE_CHECK (s, GIMPLE_CALL);
-  return (s->gsbase.subcode & GF_CALL_TAILCALL) != 0;
+  return (s->subcode & GF_CALL_TAILCALL) != 0;
 }
 
 
@@ -2426,9 +2743,9 @@ gimple_call_set_return_slot_opt (gimple s, bool return_slot_opt_p)
 {
   GIMPLE_CHECK (s, GIMPLE_CALL);
   if (return_slot_opt_p)
-    s->gsbase.subcode |= GF_CALL_RETURN_SLOT_OPT;
+    s->subcode |= GF_CALL_RETURN_SLOT_OPT;
   else
-    s->gsbase.subcode &= ~GF_CALL_RETURN_SLOT_OPT;
+    s->subcode &= ~GF_CALL_RETURN_SLOT_OPT;
 }
 
 
@@ -2438,7 +2755,7 @@ static inline bool
 gimple_call_return_slot_opt_p (gimple s)
 {
   GIMPLE_CHECK (s, GIMPLE_CALL);
-  return (s->gsbase.subcode & GF_CALL_RETURN_SLOT_OPT) != 0;
+  return (s->subcode & GF_CALL_RETURN_SLOT_OPT) != 0;
 }
 
 
@@ -2450,9 +2767,9 @@ gimple_call_set_from_thunk (gimple s, bool from_thunk_p)
 {
   GIMPLE_CHECK (s, GIMPLE_CALL);
   if (from_thunk_p)
-    s->gsbase.subcode |= GF_CALL_FROM_THUNK;
+    s->subcode |= GF_CALL_FROM_THUNK;
   else
-    s->gsbase.subcode &= ~GF_CALL_FROM_THUNK;
+    s->subcode &= ~GF_CALL_FROM_THUNK;
 }
 
 
@@ -2462,7 +2779,7 @@ static inline bool
 gimple_call_from_thunk_p (gimple s)
 {
   GIMPLE_CHECK (s, GIMPLE_CALL);
-  return (s->gsbase.subcode & GF_CALL_FROM_THUNK) != 0;
+  return (s->subcode & GF_CALL_FROM_THUNK) != 0;
 }
 
 
@@ -2474,9 +2791,9 @@ gimple_call_set_va_arg_pack (gimple s, bool pass_arg_pack_p)
 {
   GIMPLE_CHECK (s, GIMPLE_CALL);
   if (pass_arg_pack_p)
-    s->gsbase.subcode |= GF_CALL_VA_ARG_PACK;
+    s->subcode |= GF_CALL_VA_ARG_PACK;
   else
-    s->gsbase.subcode &= ~GF_CALL_VA_ARG_PACK;
+    s->subcode &= ~GF_CALL_VA_ARG_PACK;
 }
 
 
@@ -2487,7 +2804,7 @@ static inline bool
 gimple_call_va_arg_pack_p (gimple s)
 {
   GIMPLE_CHECK (s, GIMPLE_CALL);
-  return (s->gsbase.subcode & GF_CALL_VA_ARG_PACK) != 0;
+  return (s->subcode & GF_CALL_VA_ARG_PACK) != 0;
 }
 
 
@@ -2509,9 +2826,9 @@ gimple_call_set_nothrow (gimple s, bool nothrow_p)
 {
   GIMPLE_CHECK (s, GIMPLE_CALL);
   if (nothrow_p)
-    s->gsbase.subcode |= GF_CALL_NOTHROW;
+    s->subcode |= GF_CALL_NOTHROW;
   else
-    s->gsbase.subcode &= ~GF_CALL_NOTHROW;
+    s->subcode &= ~GF_CALL_NOTHROW;
 }
 
 /* Return true if S is a nothrow call.  */
@@ -2533,9 +2850,9 @@ gimple_call_set_alloca_for_var (gimple s, bool for_var)
 {
   GIMPLE_CHECK (s, GIMPLE_CALL);
   if (for_var)
-    s->gsbase.subcode |= GF_CALL_ALLOCA_FOR_VAR;
+    s->subcode |= GF_CALL_ALLOCA_FOR_VAR;
   else
-    s->gsbase.subcode &= ~GF_CALL_ALLOCA_FOR_VAR;
+    s->subcode &= ~GF_CALL_ALLOCA_FOR_VAR;
 }
 
 /* Return true of S is a call to builtin_alloca emitted for VLA objects.  */
@@ -2544,7 +2861,7 @@ static inline bool
 gimple_call_alloca_for_var_p (gimple s)
 {
   GIMPLE_CHECK (s, GIMPLE_CALL);
-  return (s->gsbase.subcode & GF_CALL_ALLOCA_FOR_VAR) != 0;
+  return (s->subcode & GF_CALL_ALLOCA_FOR_VAR) != 0;
 }
 
 /* Copy all the GF_CALL_* flags from ORIG_CALL to DEST_CALL.  */
@@ -2554,7 +2871,7 @@ gimple_call_copy_flags (gimple dest_call, gimple orig_call)
 {
   GIMPLE_CHECK (dest_call, GIMPLE_CALL);
   GIMPLE_CHECK (orig_call, GIMPLE_CALL);
-  dest_call->gsbase.subcode = orig_call->gsbase.subcode;
+  dest_call->subcode = orig_call->subcode;
 }
 
 
@@ -2564,8 +2881,8 @@ gimple_call_copy_flags (gimple dest_call, gimple orig_call)
 static inline struct pt_solution *
 gimple_call_use_set (gimple call)
 {
-  GIMPLE_CHECK (call, GIMPLE_CALL);
-  return &call->gimple_call.call_used;
+  gimple_statement_call *call_stmt = as_a <gimple_statement_call> (call);
+  return &call_stmt->call_used;
 }
 
 
@@ -2575,8 +2892,8 @@ gimple_call_use_set (gimple call)
 static inline struct pt_solution *
 gimple_call_clobber_set (gimple call)
 {
-  GIMPLE_CHECK (call, GIMPLE_CALL);
-  return &call->gimple_call.call_clobbered;
+  gimple_statement_call *call_stmt = as_a <gimple_statement_call> (call);
+  return &call_stmt->call_clobbered;
 }
 
 
@@ -2598,7 +2915,7 @@ static inline enum tree_code
 gimple_cond_code (const_gimple gs)
 {
   GIMPLE_CHECK (gs, GIMPLE_COND);
-  return (enum tree_code) gs->gsbase.subcode;
+  return (enum tree_code) gs->subcode;
 }
 
 
@@ -2608,7 +2925,7 @@ static inline void
 gimple_cond_set_code (gimple gs, enum tree_code code)
 {
   GIMPLE_CHECK (gs, GIMPLE_COND);
-  gs->gsbase.subcode = code;
+  gs->subcode = code;
 }
 
 
@@ -2724,7 +3041,7 @@ gimple_cond_make_false (gimple gs)
 {
   gimple_cond_set_lhs (gs, boolean_true_node);
   gimple_cond_set_rhs (gs, boolean_false_node);
-  gs->gsbase.subcode = EQ_EXPR;
+  gs->subcode = EQ_EXPR;
 }
 
 
@@ -2735,7 +3052,7 @@ gimple_cond_make_true (gimple gs)
 {
   gimple_cond_set_lhs (gs, boolean_true_node);
   gimple_cond_set_rhs (gs, boolean_true_node);
-  gs->gsbase.subcode = EQ_EXPR;
+  gs->subcode = EQ_EXPR;
 }
 
 /* Check if conditional statemente GS is of the form 'if (1 == 1)',
@@ -2844,8 +3161,9 @@ gimple_goto_set_dest (gimple gs, tree dest)
 static inline tree
 gimple_bind_vars (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_BIND);
-  return gs->gimple_bind.vars;
+  const gimple_statement_bind *bind_stmt =
+    as_a <const gimple_statement_bind> (gs);
+  return bind_stmt->vars;
 }
 
 
@@ -2855,8 +3173,8 @@ gimple_bind_vars (const_gimple gs)
 static inline void
 gimple_bind_set_vars (gimple gs, tree vars)
 {
-  GIMPLE_CHECK (gs, GIMPLE_BIND);
-  gs->gimple_bind.vars = vars;
+  gimple_statement_bind *bind_stmt = as_a <gimple_statement_bind> (gs);
+  bind_stmt->vars = vars;
 }
 
 
@@ -2866,16 +3184,16 @@ gimple_bind_set_vars (gimple gs, tree vars)
 static inline void
 gimple_bind_append_vars (gimple gs, tree vars)
 {
-  GIMPLE_CHECK (gs, GIMPLE_BIND);
-  gs->gimple_bind.vars = chainon (gs->gimple_bind.vars, vars);
+  gimple_statement_bind *bind_stmt = as_a <gimple_statement_bind> (gs);
+  bind_stmt->vars = chainon (bind_stmt->vars, vars);
 }
 
 
 static inline gimple_seq *
 gimple_bind_body_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_BIND);
-  return &gs->gimple_bind.body;
+  gimple_statement_bind *bind_stmt = as_a <gimple_statement_bind> (gs);
+  return &bind_stmt->body;
 }
 
 /* Return the GIMPLE sequence contained in the GIMPLE_BIND statement GS.  */
@@ -2893,8 +3211,8 @@ gimple_bind_body (gimple gs)
 static inline void
 gimple_bind_set_body (gimple gs, gimple_seq seq)
 {
-  GIMPLE_CHECK (gs, GIMPLE_BIND);
-  gs->gimple_bind.body = seq;
+  gimple_statement_bind *bind_stmt = as_a <gimple_statement_bind> (gs);
+  bind_stmt->body = seq;
 }
 
 
@@ -2903,8 +3221,8 @@ gimple_bind_set_body (gimple gs, gimple_seq seq)
 static inline void
 gimple_bind_add_stmt (gimple gs, gimple stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_BIND);
-  gimple_seq_add_stmt (&gs->gimple_bind.body, stmt);
+  gimple_statement_bind *bind_stmt = as_a <gimple_statement_bind> (gs);
+  gimple_seq_add_stmt (&bind_stmt->body, stmt);
 }
 
 
@@ -2913,8 +3231,8 @@ gimple_bind_add_stmt (gimple gs, gimple stmt)
 static inline void
 gimple_bind_add_seq (gimple gs, gimple_seq seq)
 {
-  GIMPLE_CHECK (gs, GIMPLE_BIND);
-  gimple_seq_add_seq (&gs->gimple_bind.body, seq);
+  gimple_statement_bind *bind_stmt = as_a <gimple_statement_bind> (gs);
+  gimple_seq_add_seq (&bind_stmt->body, seq);
 }
 
 
@@ -2924,8 +3242,9 @@ gimple_bind_add_seq (gimple gs, gimple_seq seq)
 static inline tree
 gimple_bind_block (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_BIND);
-  return gs->gimple_bind.block;
+  const gimple_statement_bind *bind_stmt =
+    as_a <const gimple_statement_bind> (gs);
+  return bind_stmt->block;
 }
 
 
@@ -2935,10 +3254,10 @@ gimple_bind_block (const_gimple gs)
 static inline void
 gimple_bind_set_block (gimple gs, tree block)
 {
-  GIMPLE_CHECK (gs, GIMPLE_BIND);
+  gimple_statement_bind *bind_stmt = as_a <gimple_statement_bind> (gs);
   gcc_gimple_checking_assert (block == NULL_TREE
 			      || TREE_CODE (block) == BLOCK);
-  gs->gimple_bind.block = block;
+  bind_stmt->block = block;
 }
 
 
@@ -2947,8 +3266,9 @@ gimple_bind_set_block (gimple gs, tree block)
 static inline unsigned
 gimple_asm_ninputs (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  return gs->gimple_asm.ni;
+  const gimple_statement_asm *asm_stmt =
+    as_a <const gimple_statement_asm> (gs);
+  return asm_stmt->ni;
 }
 
 
@@ -2957,8 +3277,9 @@ gimple_asm_ninputs (const_gimple gs)
 static inline unsigned
 gimple_asm_noutputs (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  return gs->gimple_asm.no;
+  const gimple_statement_asm *asm_stmt =
+    as_a <const gimple_statement_asm> (gs);
+  return asm_stmt->no;
 }
 
 
@@ -2967,8 +3288,9 @@ gimple_asm_noutputs (const_gimple gs)
 static inline unsigned
 gimple_asm_nclobbers (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  return gs->gimple_asm.nc;
+  const gimple_statement_asm *asm_stmt =
+    as_a <const gimple_statement_asm> (gs);
+  return asm_stmt->nc;
 }
 
 /* Return the number of label operands for GIMPLE_ASM GS.  */
@@ -2976,8 +3298,9 @@ gimple_asm_nclobbers (const_gimple gs)
 static inline unsigned
 gimple_asm_nlabels (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  return gs->gimple_asm.nl;
+  const gimple_statement_asm *asm_stmt =
+    as_a <const gimple_statement_asm> (gs);
+  return asm_stmt->nl;
 }
 
 /* Return input operand INDEX of GIMPLE_ASM GS.  */
@@ -2985,9 +3308,10 @@ gimple_asm_nlabels (const_gimple gs)
 static inline tree
 gimple_asm_input_op (const_gimple gs, unsigned index)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  gcc_gimple_checking_assert (index < gs->gimple_asm.ni);
-  return gimple_op (gs, index + gs->gimple_asm.no);
+  const gimple_statement_asm *asm_stmt =
+    as_a <const gimple_statement_asm> (gs);
+  gcc_gimple_checking_assert (index < asm_stmt->ni);
+  return gimple_op (gs, index + asm_stmt->no);
 }
 
 /* Return a pointer to input operand INDEX of GIMPLE_ASM GS.  */
@@ -2995,9 +3319,10 @@ gimple_asm_input_op (const_gimple gs, unsigned index)
 static inline tree *
 gimple_asm_input_op_ptr (const_gimple gs, unsigned index)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  gcc_gimple_checking_assert (index < gs->gimple_asm.ni);
-  return gimple_op_ptr (gs, index + gs->gimple_asm.no);
+  const gimple_statement_asm *asm_stmt =
+    as_a <const gimple_statement_asm> (gs);
+  gcc_gimple_checking_assert (index < asm_stmt->ni);
+  return gimple_op_ptr (gs, index + asm_stmt->no);
 }
 
 
@@ -3006,10 +3331,10 @@ gimple_asm_input_op_ptr (const_gimple gs, unsigned index)
 static inline void
 gimple_asm_set_input_op (gimple gs, unsigned index, tree in_op)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  gcc_gimple_checking_assert (index < gs->gimple_asm.ni
+  gimple_statement_asm *asm_stmt = as_a <gimple_statement_asm> (gs);
+  gcc_gimple_checking_assert (index < asm_stmt->ni
 			      && TREE_CODE (in_op) == TREE_LIST);
-  gimple_set_op (gs, index + gs->gimple_asm.no, in_op);
+  gimple_set_op (gs, index + asm_stmt->no, in_op);
 }
 
 
@@ -3018,8 +3343,9 @@ gimple_asm_set_input_op (gimple gs, unsigned index, tree in_op)
 static inline tree
 gimple_asm_output_op (const_gimple gs, unsigned index)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  gcc_gimple_checking_assert (index < gs->gimple_asm.no);
+  const gimple_statement_asm *asm_stmt =
+    as_a <const gimple_statement_asm> (gs);
+  gcc_gimple_checking_assert (index < asm_stmt->no);
   return gimple_op (gs, index);
 }
 
@@ -3028,8 +3354,9 @@ gimple_asm_output_op (const_gimple gs, unsigned index)
 static inline tree *
 gimple_asm_output_op_ptr (const_gimple gs, unsigned index)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  gcc_gimple_checking_assert (index < gs->gimple_asm.no);
+  const gimple_statement_asm *asm_stmt =
+    as_a <const gimple_statement_asm> (gs);
+  gcc_gimple_checking_assert (index < asm_stmt->no);
   return gimple_op_ptr (gs, index);
 }
 
@@ -3039,8 +3366,8 @@ gimple_asm_output_op_ptr (const_gimple gs, unsigned index)
 static inline void
 gimple_asm_set_output_op (gimple gs, unsigned index, tree out_op)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  gcc_gimple_checking_assert (index < gs->gimple_asm.no
+  gimple_statement_asm *asm_stmt = as_a <gimple_statement_asm> (gs);
+  gcc_gimple_checking_assert (index < asm_stmt->no
 			      && TREE_CODE (out_op) == TREE_LIST);
   gimple_set_op (gs, index, out_op);
 }
@@ -3051,9 +3378,10 @@ gimple_asm_set_output_op (gimple gs, unsigned index, tree out_op)
 static inline tree
 gimple_asm_clobber_op (const_gimple gs, unsigned index)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  gcc_gimple_checking_assert (index < gs->gimple_asm.nc);
-  return gimple_op (gs, index + gs->gimple_asm.ni + gs->gimple_asm.no);
+  const gimple_statement_asm *asm_stmt =
+    as_a <const gimple_statement_asm> (gs);
+  gcc_gimple_checking_assert (index < asm_stmt->nc);
+  return gimple_op (gs, index + asm_stmt->ni + asm_stmt->no);
 }
 
 
@@ -3062,10 +3390,10 @@ gimple_asm_clobber_op (const_gimple gs, unsigned index)
 static inline void
 gimple_asm_set_clobber_op (gimple gs, unsigned index, tree clobber_op)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  gcc_gimple_checking_assert (index < gs->gimple_asm.nc
+  gimple_statement_asm *asm_stmt = as_a <gimple_statement_asm> (gs);
+  gcc_gimple_checking_assert (index < asm_stmt->nc
 			      && TREE_CODE (clobber_op) == TREE_LIST);
-  gimple_set_op (gs, index + gs->gimple_asm.ni + gs->gimple_asm.no, clobber_op);
+  gimple_set_op (gs, index + asm_stmt->ni + asm_stmt->no, clobber_op);
 }
 
 /* Return label operand INDEX of GIMPLE_ASM GS.  */
@@ -3073,9 +3401,10 @@ gimple_asm_set_clobber_op (gimple gs, unsigned index, tree clobber_op)
 static inline tree
 gimple_asm_label_op (const_gimple gs, unsigned index)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  gcc_gimple_checking_assert (index < gs->gimple_asm.nl);
-  return gimple_op (gs, index + gs->gimple_asm.ni + gs->gimple_asm.nc);
+  const gimple_statement_asm *asm_stmt =
+    as_a <const gimple_statement_asm> (gs);
+  gcc_gimple_checking_assert (index < asm_stmt->nl);
+  return gimple_op (gs, index + asm_stmt->ni + asm_stmt->nc);
 }
 
 /* Set LABEL_OP to be label operand INDEX in GIMPLE_ASM GS.  */
@@ -3083,10 +3412,10 @@ gimple_asm_label_op (const_gimple gs, unsigned index)
 static inline void
 gimple_asm_set_label_op (gimple gs, unsigned index, tree label_op)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  gcc_gimple_checking_assert (index < gs->gimple_asm.nl
+  gimple_statement_asm *asm_stmt = as_a <gimple_statement_asm> (gs);
+  gcc_gimple_checking_assert (index < asm_stmt->nl
 			      && TREE_CODE (label_op) == TREE_LIST);
-  gimple_set_op (gs, index + gs->gimple_asm.ni + gs->gimple_asm.nc, label_op);
+  gimple_set_op (gs, index + asm_stmt->ni + asm_stmt->nc, label_op);
 }
 
 /* Return the string representing the assembly instruction in
@@ -3095,8 +3424,9 @@ gimple_asm_set_label_op (gimple gs, unsigned index, tree label_op)
 static inline const char *
 gimple_asm_string (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  return gs->gimple_asm.string;
+  const gimple_statement_asm *asm_stmt =
+    as_a <const gimple_statement_asm> (gs);
+  return asm_stmt->string;
 }
 
 
@@ -3106,7 +3436,7 @@ static inline bool
 gimple_asm_volatile_p (const_gimple gs)
 {
   GIMPLE_CHECK (gs, GIMPLE_ASM);
-  return (gs->gsbase.subcode & GF_ASM_VOLATILE) != 0;
+  return (gs->subcode & GF_ASM_VOLATILE) != 0;
 }
 
 
@@ -3117,9 +3447,9 @@ gimple_asm_set_volatile (gimple gs, bool volatile_p)
 {
   GIMPLE_CHECK (gs, GIMPLE_ASM);
   if (volatile_p)
-    gs->gsbase.subcode |= GF_ASM_VOLATILE;
+    gs->subcode |= GF_ASM_VOLATILE;
   else
-    gs->gsbase.subcode &= ~GF_ASM_VOLATILE;
+    gs->subcode &= ~GF_ASM_VOLATILE;
 }
 
 
@@ -3130,9 +3460,9 @@ gimple_asm_set_input (gimple gs, bool input_p)
 {
   GIMPLE_CHECK (gs, GIMPLE_ASM);
   if (input_p)
-    gs->gsbase.subcode |= GF_ASM_INPUT;
+    gs->subcode |= GF_ASM_INPUT;
   else
-    gs->gsbase.subcode &= ~GF_ASM_INPUT;
+    gs->subcode &= ~GF_ASM_INPUT;
 }
 
 
@@ -3142,7 +3472,7 @@ static inline bool
 gimple_asm_input_p (const_gimple gs)
 {
   GIMPLE_CHECK (gs, GIMPLE_ASM);
-  return (gs->gsbase.subcode & GF_ASM_INPUT) != 0;
+  return (gs->subcode & GF_ASM_INPUT) != 0;
 }
 
 
@@ -3151,8 +3481,9 @@ gimple_asm_input_p (const_gimple gs)
 static inline tree
 gimple_catch_types (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_CATCH);
-  return gs->gimple_catch.types;
+  const gimple_statement_catch *catch_stmt =
+    as_a <const gimple_statement_catch> (gs);
+  return catch_stmt->types;
 }
 
 
@@ -3161,8 +3492,8 @@ gimple_catch_types (const_gimple gs)
 static inline tree *
 gimple_catch_types_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_CATCH);
-  return &gs->gimple_catch.types;
+  gimple_statement_catch *catch_stmt = as_a <gimple_statement_catch> (gs);
+  return &catch_stmt->types;
 }
 
 
@@ -3172,8 +3503,8 @@ gimple_catch_types_ptr (gimple gs)
 static inline gimple_seq *
 gimple_catch_handler_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_CATCH);
-  return &gs->gimple_catch.handler;
+  gimple_statement_catch *catch_stmt = as_a <gimple_statement_catch> (gs);
+  return &catch_stmt->handler;
 }
 
 
@@ -3192,8 +3523,8 @@ gimple_catch_handler (gimple gs)
 static inline void
 gimple_catch_set_types (gimple gs, tree t)
 {
-  GIMPLE_CHECK (gs, GIMPLE_CATCH);
-  gs->gimple_catch.types = t;
+  gimple_statement_catch *catch_stmt = as_a <gimple_statement_catch> (gs);
+  catch_stmt->types = t;
 }
 
 
@@ -3202,8 +3533,8 @@ gimple_catch_set_types (gimple gs, tree t)
 static inline void
 gimple_catch_set_handler (gimple gs, gimple_seq handler)
 {
-  GIMPLE_CHECK (gs, GIMPLE_CATCH);
-  gs->gimple_catch.handler = handler;
+  gimple_statement_catch *catch_stmt = as_a <gimple_statement_catch> (gs);
+  catch_stmt->handler = handler;
 }
 
 
@@ -3212,8 +3543,9 @@ gimple_catch_set_handler (gimple gs, gimple_seq handler)
 static inline tree
 gimple_eh_filter_types (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
-  return gs->gimple_eh_filter.types;
+  const gimple_statement_eh_filter *eh_filter_stmt =
+    as_a <const gimple_statement_eh_filter> (gs);
+  return eh_filter_stmt->types;
 }
 
 
@@ -3223,8 +3555,9 @@ gimple_eh_filter_types (const_gimple gs)
 static inline tree *
 gimple_eh_filter_types_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
-  return &gs->gimple_eh_filter.types;
+  gimple_statement_eh_filter *eh_filter_stmt =
+    as_a <gimple_statement_eh_filter> (gs);
+  return &eh_filter_stmt->types;
 }
 
 
@@ -3234,8 +3567,9 @@ gimple_eh_filter_types_ptr (gimple gs)
 static inline gimple_seq *
 gimple_eh_filter_failure_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
-  return &gs->gimple_eh_filter.failure;
+  gimple_statement_eh_filter *eh_filter_stmt =
+    as_a <gimple_statement_eh_filter> (gs);
+  return &eh_filter_stmt->failure;
 }
 
 
@@ -3254,8 +3588,9 @@ gimple_eh_filter_failure (gimple gs)
 static inline void
 gimple_eh_filter_set_types (gimple gs, tree types)
 {
-  GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
-  gs->gimple_eh_filter.types = types;
+  gimple_statement_eh_filter *eh_filter_stmt =
+    as_a <gimple_statement_eh_filter> (gs);
+  eh_filter_stmt->types = types;
 }
 
 
@@ -3265,8 +3600,9 @@ gimple_eh_filter_set_types (gimple gs, tree types)
 static inline void
 gimple_eh_filter_set_failure (gimple gs, gimple_seq failure)
 {
-  GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
-  gs->gimple_eh_filter.failure = failure;
+  gimple_statement_eh_filter *eh_filter_stmt =
+    as_a <gimple_statement_eh_filter> (gs);
+  eh_filter_stmt->failure = failure;
 }
 
 /* Get the function decl to be called by the MUST_NOT_THROW region.  */
@@ -3274,8 +3610,8 @@ gimple_eh_filter_set_failure (gimple gs, gimple_seq failure)
 static inline tree
 gimple_eh_must_not_throw_fndecl (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_EH_MUST_NOT_THROW);
-  return gs->gimple_eh_mnt.fndecl;
+  gimple_statement_eh_mnt *eh_mnt_stmt = as_a <gimple_statement_eh_mnt> (gs);
+  return eh_mnt_stmt->fndecl;
 }
 
 /* Set the function decl to be called by GS to DECL.  */
@@ -3283,8 +3619,8 @@ gimple_eh_must_not_throw_fndecl (gimple gs)
 static inline void
 gimple_eh_must_not_throw_set_fndecl (gimple gs, tree decl)
 {
-  GIMPLE_CHECK (gs, GIMPLE_EH_MUST_NOT_THROW);
-  gs->gimple_eh_mnt.fndecl = decl;
+  gimple_statement_eh_mnt *eh_mnt_stmt = as_a <gimple_statement_eh_mnt> (gs);
+  eh_mnt_stmt->fndecl = decl;
 }
 
 /* GIMPLE_EH_ELSE accessors.  */
@@ -3292,8 +3628,9 @@ gimple_eh_must_not_throw_set_fndecl (gimple gs, tree decl)
 static inline gimple_seq *
 gimple_eh_else_n_body_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_EH_ELSE);
-  return &gs->gimple_eh_else.n_body;
+  gimple_statement_eh_else *eh_else_stmt =
+    as_a <gimple_statement_eh_else> (gs);
+  return &eh_else_stmt->n_body;
 }
 
 static inline gimple_seq
@@ -3305,8 +3642,9 @@ gimple_eh_else_n_body (gimple gs)
 static inline gimple_seq *
 gimple_eh_else_e_body_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_EH_ELSE);
-  return &gs->gimple_eh_else.e_body;
+  gimple_statement_eh_else *eh_else_stmt =
+    as_a <gimple_statement_eh_else> (gs);
+  return &eh_else_stmt->e_body;
 }
 
 static inline gimple_seq
@@ -3318,15 +3656,17 @@ gimple_eh_else_e_body (gimple gs)
 static inline void
 gimple_eh_else_set_n_body (gimple gs, gimple_seq seq)
 {
-  GIMPLE_CHECK (gs, GIMPLE_EH_ELSE);
-  gs->gimple_eh_else.n_body = seq;
+  gimple_statement_eh_else *eh_else_stmt =
+    as_a <gimple_statement_eh_else> (gs);
+  eh_else_stmt->n_body = seq;
 }
 
 static inline void
 gimple_eh_else_set_e_body (gimple gs, gimple_seq seq)
 {
-  GIMPLE_CHECK (gs, GIMPLE_EH_ELSE);
-  gs->gimple_eh_else.e_body = seq;
+  gimple_statement_eh_else *eh_else_stmt =
+    as_a <gimple_statement_eh_else> (gs);
+  eh_else_stmt->e_body = seq;
 }
 
 /* GIMPLE_TRY accessors. */
@@ -3338,7 +3678,7 @@ static inline enum gimple_try_flags
 gimple_try_kind (const_gimple gs)
 {
   GIMPLE_CHECK (gs, GIMPLE_TRY);
-  return (enum gimple_try_flags) (gs->gsbase.subcode & GIMPLE_TRY_KIND);
+  return (enum gimple_try_flags) (gs->subcode & GIMPLE_TRY_KIND);
 }
 
 
@@ -3351,7 +3691,7 @@ gimple_try_set_kind (gimple gs, enum gimple_try_flags kind)
   gcc_gimple_checking_assert (kind == GIMPLE_TRY_CATCH
 			      || kind == GIMPLE_TRY_FINALLY);
   if (gimple_try_kind (gs) != kind)
-    gs->gsbase.subcode = (unsigned int) kind;
+    gs->subcode = (unsigned int) kind;
 }
 
 
@@ -3361,7 +3701,7 @@ static inline bool
 gimple_try_catch_is_cleanup (const_gimple gs)
 {
   gcc_gimple_checking_assert (gimple_try_kind (gs) == GIMPLE_TRY_CATCH);
-  return (gs->gsbase.subcode & GIMPLE_TRY_CATCH_IS_CLEANUP) != 0;
+  return (gs->subcode & GIMPLE_TRY_CATCH_IS_CLEANUP) != 0;
 }
 
 
@@ -3371,8 +3711,8 @@ gimple_try_catch_is_cleanup (const_gimple gs)
 static inline gimple_seq *
 gimple_try_eval_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_TRY);
-  return &gs->gimple_try.eval;
+  gimple_statement_try *try_stmt = as_a <gimple_statement_try> (gs);
+  return &try_stmt->eval;
 }
 
 
@@ -3391,8 +3731,8 @@ gimple_try_eval (gimple gs)
 static inline gimple_seq *
 gimple_try_cleanup_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_TRY);
-  return &gs->gimple_try.cleanup;
+  gimple_statement_try *try_stmt = as_a <gimple_statement_try> (gs);
+  return &try_stmt->cleanup;
 }
 
 
@@ -3413,9 +3753,9 @@ gimple_try_set_catch_is_cleanup (gimple g, bool catch_is_cleanup)
 {
   gcc_gimple_checking_assert (gimple_try_kind (g) == GIMPLE_TRY_CATCH);
   if (catch_is_cleanup)
-    g->gsbase.subcode |= GIMPLE_TRY_CATCH_IS_CLEANUP;
+    g->subcode |= GIMPLE_TRY_CATCH_IS_CLEANUP;
   else
-    g->gsbase.subcode &= ~GIMPLE_TRY_CATCH_IS_CLEANUP;
+    g->subcode &= ~GIMPLE_TRY_CATCH_IS_CLEANUP;
 }
 
 
@@ -3425,8 +3765,8 @@ gimple_try_set_catch_is_cleanup (gimple g, bool catch_is_cleanup)
 static inline void
 gimple_try_set_eval (gimple gs, gimple_seq eval)
 {
-  GIMPLE_CHECK (gs, GIMPLE_TRY);
-  gs->gimple_try.eval = eval;
+  gimple_statement_try *try_stmt = as_a <gimple_statement_try> (gs);
+  try_stmt->eval = eval;
 }
 
 
@@ -3436,8 +3776,8 @@ gimple_try_set_eval (gimple gs, gimple_seq eval)
 static inline void
 gimple_try_set_cleanup (gimple gs, gimple_seq cleanup)
 {
-  GIMPLE_CHECK (gs, GIMPLE_TRY);
-  gs->gimple_try.cleanup = cleanup;
+  gimple_statement_try *try_stmt = as_a <gimple_statement_try> (gs);
+  try_stmt->cleanup = cleanup;
 }
 
 
@@ -3446,8 +3786,8 @@ gimple_try_set_cleanup (gimple gs, gimple_seq cleanup)
 static inline gimple_seq *
 gimple_wce_cleanup_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_WITH_CLEANUP_EXPR);
-  return &gs->gimple_wce.cleanup;
+  gimple_statement_wce *wce_stmt = as_a <gimple_statement_wce> (gs);
+  return &wce_stmt->cleanup;
 }
 
 
@@ -3465,8 +3805,8 @@ gimple_wce_cleanup (gimple gs)
 static inline void
 gimple_wce_set_cleanup (gimple gs, gimple_seq cleanup)
 {
-  GIMPLE_CHECK (gs, GIMPLE_WITH_CLEANUP_EXPR);
-  gs->gimple_wce.cleanup = cleanup;
+  gimple_statement_wce *wce_stmt = as_a <gimple_statement_wce> (gs);
+  wce_stmt->cleanup = cleanup;
 }
 
 
@@ -3476,7 +3816,7 @@ static inline bool
 gimple_wce_cleanup_eh_only (const_gimple gs)
 {
   GIMPLE_CHECK (gs, GIMPLE_WITH_CLEANUP_EXPR);
-  return gs->gsbase.subcode != 0;
+  return gs->subcode != 0;
 }
 
 
@@ -3486,7 +3826,7 @@ static inline void
 gimple_wce_set_cleanup_eh_only (gimple gs, bool eh_only_p)
 {
   GIMPLE_CHECK (gs, GIMPLE_WITH_CLEANUP_EXPR);
-  gs->gsbase.subcode = (unsigned int) eh_only_p;
+  gs->subcode = (unsigned int) eh_only_p;
 }
 
 
@@ -3495,8 +3835,9 @@ gimple_wce_set_cleanup_eh_only (gimple gs, bool eh_only_p)
 static inline unsigned
 gimple_phi_capacity (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_PHI);
-  return gs->gimple_phi.capacity;
+  const gimple_statement_phi *phi_stmt =
+    as_a <const gimple_statement_phi> (gs);
+  return phi_stmt->capacity;
 }
 
 
@@ -3507,8 +3848,9 @@ gimple_phi_capacity (const_gimple gs)
 static inline unsigned
 gimple_phi_num_args (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_PHI);
-  return gs->gimple_phi.nargs;
+  const gimple_statement_phi *phi_stmt =
+    as_a <const gimple_statement_phi> (gs);
+  return phi_stmt->nargs;
 }
 
 
@@ -3517,8 +3859,9 @@ gimple_phi_num_args (const_gimple gs)
 static inline tree
 gimple_phi_result (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_PHI);
-  return gs->gimple_phi.result;
+  const gimple_statement_phi *phi_stmt =
+    as_a <const gimple_statement_phi> (gs);
+  return phi_stmt->result;
 }
 
 /* Return a pointer to the SSA name created by GIMPLE_PHI GS.  */
@@ -3526,8 +3869,8 @@ gimple_phi_result (const_gimple gs)
 static inline tree *
 gimple_phi_result_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_PHI);
-  return &gs->gimple_phi.result;
+  gimple_statement_phi *phi_stmt = as_a <gimple_statement_phi> (gs);
+  return &phi_stmt->result;
 }
 
 /* Set RESULT to be the SSA name created by GIMPLE_PHI GS.  */
@@ -3535,8 +3878,8 @@ gimple_phi_result_ptr (gimple gs)
 static inline void
 gimple_phi_set_result (gimple gs, tree result)
 {
-  GIMPLE_CHECK (gs, GIMPLE_PHI);
-  gs->gimple_phi.result = result;
+  gimple_statement_phi *phi_stmt = as_a <gimple_statement_phi> (gs);
+  phi_stmt->result = result;
   if (result && TREE_CODE (result) == SSA_NAME)
     SSA_NAME_DEF_STMT (result) = gs;
 }
@@ -3548,9 +3891,9 @@ gimple_phi_set_result (gimple gs, tree result)
 static inline struct phi_arg_d *
 gimple_phi_arg (gimple gs, unsigned index)
 {
-  GIMPLE_CHECK (gs, GIMPLE_PHI);
-  gcc_gimple_checking_assert (index <= gs->gimple_phi.capacity);
-  return &(gs->gimple_phi.args[index]);
+  gimple_statement_phi *phi_stmt = as_a <gimple_statement_phi> (gs);
+  gcc_gimple_checking_assert (index <= phi_stmt->capacity);
+  return &(phi_stmt->args[index]);
 }
 
 /* Set PHIARG to be the argument corresponding to incoming edge INDEX
@@ -3559,9 +3902,9 @@ gimple_phi_arg (gimple gs, unsigned index)
 static inline void
 gimple_phi_set_arg (gimple gs, unsigned index, struct phi_arg_d * phiarg)
 {
-  GIMPLE_CHECK (gs, GIMPLE_PHI);
-  gcc_gimple_checking_assert (index <= gs->gimple_phi.nargs);
-  gs->gimple_phi.args[index] = *phiarg;
+  gimple_statement_phi *phi_stmt = as_a <gimple_statement_phi> (gs);
+  gcc_gimple_checking_assert (index <= phi_stmt->nargs);
+  phi_stmt->args[index] = *phiarg;
 }
 
 /* Return the region number for GIMPLE_RESX GS.  */
@@ -3569,8 +3912,9 @@ gimple_phi_set_arg (gimple gs, unsigned index, struct phi_arg_d * phiarg)
 static inline int
 gimple_resx_region (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_RESX);
-  return gs->gimple_eh_ctrl.region;
+  const gimple_statement_eh_ctrl *eh_ctrl_stmt =
+    as_a <const gimple_statement_eh_ctrl> (gs);
+  return eh_ctrl_stmt->region;
 }
 
 /* Set REGION to be the region number for GIMPLE_RESX GS.  */
@@ -3578,8 +3922,9 @@ gimple_resx_region (const_gimple gs)
 static inline void
 gimple_resx_set_region (gimple gs, int region)
 {
-  GIMPLE_CHECK (gs, GIMPLE_RESX);
-  gs->gimple_eh_ctrl.region = region;
+  gimple_statement_eh_ctrl *eh_ctrl_stmt =
+    as_a <gimple_statement_eh_ctrl> (gs);
+  eh_ctrl_stmt->region = region;
 }
 
 /* Return the region number for GIMPLE_EH_DISPATCH GS.  */
@@ -3587,8 +3932,9 @@ gimple_resx_set_region (gimple gs, int region)
 static inline int
 gimple_eh_dispatch_region (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_EH_DISPATCH);
-  return gs->gimple_eh_ctrl.region;
+  const gimple_statement_eh_ctrl *eh_ctrl_stmt =
+    as_a <const gimple_statement_eh_ctrl> (gs);
+  return eh_ctrl_stmt->region;
 }
 
 /* Set REGION to be the region number for GIMPLE_EH_DISPATCH GS.  */
@@ -3596,8 +3942,9 @@ gimple_eh_dispatch_region (const_gimple gs)
 static inline void
 gimple_eh_dispatch_set_region (gimple gs, int region)
 {
-  GIMPLE_CHECK (gs, GIMPLE_EH_DISPATCH);
-  gs->gimple_eh_ctrl.region = region;
+  gimple_statement_eh_ctrl *eh_ctrl_stmt =
+    as_a <gimple_statement_eh_ctrl> (gs);
+  eh_ctrl_stmt->region = region;
 }
 
 /* Return the number of labels associated with the switch statement GS.  */
@@ -3710,7 +4057,7 @@ static inline bool
 gimple_debug_bind_p (const_gimple s)
 {
   if (is_gimple_debug (s))
-    return s->gsbase.subcode == GIMPLE_DEBUG_BIND;
+    return s->subcode == GIMPLE_DEBUG_BIND;
 
   return false;
 }
@@ -3802,7 +4149,7 @@ static inline bool
 gimple_debug_source_bind_p (const_gimple s)
 {
   if (is_gimple_debug (s))
-    return s->gsbase.subcode == GIMPLE_DEBUG_SOURCE_BIND;
+    return s->subcode == GIMPLE_DEBUG_SOURCE_BIND;
 
   return false;
 }
@@ -3890,8 +4237,9 @@ gimple_omp_set_body (gimple gs, gimple_seq body)
 static inline tree
 gimple_omp_critical_name (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_CRITICAL);
-  return gs->gimple_omp_critical.name;
+  const gimple_statement_omp_critical *omp_critical_stmt =
+    as_a <const gimple_statement_omp_critical> (gs);
+  return omp_critical_stmt->name;
 }
 
 
@@ -3900,8 +4248,9 @@ gimple_omp_critical_name (const_gimple gs)
 static inline tree *
 gimple_omp_critical_name_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_CRITICAL);
-  return &gs->gimple_omp_critical.name;
+  gimple_statement_omp_critical *omp_critical_stmt =
+    as_a <gimple_statement_omp_critical> (gs);
+  return &omp_critical_stmt->name;
 }
 
 
@@ -3910,8 +4259,9 @@ gimple_omp_critical_name_ptr (gimple gs)
 static inline void
 gimple_omp_critical_set_name (gimple gs, tree name)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_CRITICAL);
-  gs->gimple_omp_critical.name = name;
+  gimple_statement_omp_critical *omp_critical_stmt =
+    as_a <gimple_statement_omp_critical> (gs);
+  omp_critical_stmt->name = name;
 }
 
 
@@ -3931,7 +4281,7 @@ static inline void
 gimple_omp_for_set_kind (gimple g, int kind)
 {
   GIMPLE_CHECK (g, GIMPLE_OMP_FOR);
-  g->gsbase.subcode = (g->gsbase.subcode & ~GF_OMP_FOR_KIND_MASK)
+  g->subcode = (g->subcode & ~GF_OMP_FOR_KIND_MASK)
 		      | (kind & GF_OMP_FOR_KIND_MASK);
 }
 
@@ -3941,8 +4291,9 @@ gimple_omp_for_set_kind (gimple g, int kind)
 static inline tree
 gimple_omp_for_clauses (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  return gs->gimple_omp_for.clauses;
+  const gimple_statement_omp_for *omp_for_stmt =
+    as_a <const gimple_statement_omp_for> (gs);
+  return omp_for_stmt->clauses;
 }
 
 
@@ -3951,8 +4302,9 @@ gimple_omp_for_clauses (const_gimple gs)
 static inline tree *
 gimple_omp_for_clauses_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  return &gs->gimple_omp_for.clauses;
+  gimple_statement_omp_for *omp_for_stmt =
+    as_a <gimple_statement_omp_for> (gs);
+  return &omp_for_stmt->clauses;
 }
 
 
@@ -3961,8 +4313,9 @@ gimple_omp_for_clauses_ptr (gimple gs)
 static inline void
 gimple_omp_for_set_clauses (gimple gs, tree clauses)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gs->gimple_omp_for.clauses = clauses;
+  gimple_statement_omp_for *omp_for_stmt =
+    as_a <gimple_statement_omp_for> (gs);
+  omp_for_stmt->clauses = clauses;
 }
 
 
@@ -3971,8 +4324,9 @@ gimple_omp_for_set_clauses (gimple gs, tree clauses)
 static inline size_t
 gimple_omp_for_collapse (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  return gs->gimple_omp_for.collapse;
+  gimple_statement_omp_for *omp_for_stmt =
+    as_a <gimple_statement_omp_for> (gs);
+  return omp_for_stmt->collapse;
 }
 
 
@@ -3981,9 +4335,10 @@ gimple_omp_for_collapse (gimple gs)
 static inline tree
 gimple_omp_for_index (const_gimple gs, size_t i)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
-  return gs->gimple_omp_for.iter[i].index;
+  const gimple_statement_omp_for *omp_for_stmt =
+    as_a <const gimple_statement_omp_for> (gs);
+  gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+  return omp_for_stmt->iter[i].index;
 }
 
 
@@ -3992,9 +4347,10 @@ gimple_omp_for_index (const_gimple gs, size_t i)
 static inline tree *
 gimple_omp_for_index_ptr (gimple gs, size_t i)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
-  return &gs->gimple_omp_for.iter[i].index;
+  gimple_statement_omp_for *omp_for_stmt =
+    as_a <gimple_statement_omp_for> (gs);
+  gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+  return &omp_for_stmt->iter[i].index;
 }
 
 
@@ -4003,9 +4359,10 @@ gimple_omp_for_index_ptr (gimple gs, size_t i)
 static inline void
 gimple_omp_for_set_index (gimple gs, size_t i, tree index)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
-  gs->gimple_omp_for.iter[i].index = index;
+  gimple_statement_omp_for *omp_for_stmt =
+    as_a <gimple_statement_omp_for> (gs);
+  gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+  omp_for_stmt->iter[i].index = index;
 }
 
 
@@ -4014,9 +4371,10 @@ gimple_omp_for_set_index (gimple gs, size_t i, tree index)
 static inline tree
 gimple_omp_for_initial (const_gimple gs, size_t i)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
-  return gs->gimple_omp_for.iter[i].initial;
+  const gimple_statement_omp_for *omp_for_stmt =
+    as_a <const gimple_statement_omp_for> (gs);
+  gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+  return omp_for_stmt->iter[i].initial;
 }
 
 
@@ -4025,9 +4383,10 @@ gimple_omp_for_initial (const_gimple gs, size_t i)
 static inline tree *
 gimple_omp_for_initial_ptr (gimple gs, size_t i)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
-  return &gs->gimple_omp_for.iter[i].initial;
+  gimple_statement_omp_for *omp_for_stmt =
+    as_a <gimple_statement_omp_for> (gs);
+  gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+  return &omp_for_stmt->iter[i].initial;
 }
 
 
@@ -4036,9 +4395,10 @@ gimple_omp_for_initial_ptr (gimple gs, size_t i)
 static inline void
 gimple_omp_for_set_initial (gimple gs, size_t i, tree initial)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
-  gs->gimple_omp_for.iter[i].initial = initial;
+  gimple_statement_omp_for *omp_for_stmt =
+    as_a <gimple_statement_omp_for> (gs);
+  gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+  omp_for_stmt->iter[i].initial = initial;
 }
 
 
@@ -4047,9 +4407,10 @@ gimple_omp_for_set_initial (gimple gs, size_t i, tree initial)
 static inline tree
 gimple_omp_for_final (const_gimple gs, size_t i)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
-  return gs->gimple_omp_for.iter[i].final;
+  const gimple_statement_omp_for *omp_for_stmt =
+    as_a <const gimple_statement_omp_for> (gs);
+  gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+  return omp_for_stmt->iter[i].final;
 }
 
 
@@ -4058,9 +4419,10 @@ gimple_omp_for_final (const_gimple gs, size_t i)
 static inline tree *
 gimple_omp_for_final_ptr (gimple gs, size_t i)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
-  return &gs->gimple_omp_for.iter[i].final;
+  gimple_statement_omp_for *omp_for_stmt =
+    as_a <gimple_statement_omp_for> (gs);
+  gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+  return &omp_for_stmt->iter[i].final;
 }
 
 
@@ -4069,9 +4431,10 @@ gimple_omp_for_final_ptr (gimple gs, size_t i)
 static inline void
 gimple_omp_for_set_final (gimple gs, size_t i, tree final)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
-  gs->gimple_omp_for.iter[i].final = final;
+  gimple_statement_omp_for *omp_for_stmt =
+    as_a <gimple_statement_omp_for> (gs);
+  gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+  omp_for_stmt->iter[i].final = final;
 }
 
 
@@ -4080,9 +4443,10 @@ gimple_omp_for_set_final (gimple gs, size_t i, tree final)
 static inline tree
 gimple_omp_for_incr (const_gimple gs, size_t i)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
-  return gs->gimple_omp_for.iter[i].incr;
+  const gimple_statement_omp_for *omp_for_stmt =
+    as_a <const gimple_statement_omp_for> (gs);
+  gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+  return omp_for_stmt->iter[i].incr;
 }
 
 
@@ -4091,9 +4455,10 @@ gimple_omp_for_incr (const_gimple gs, size_t i)
 static inline tree *
 gimple_omp_for_incr_ptr (gimple gs, size_t i)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
-  return &gs->gimple_omp_for.iter[i].incr;
+  gimple_statement_omp_for *omp_for_stmt =
+    as_a <gimple_statement_omp_for> (gs);
+  gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+  return &omp_for_stmt->iter[i].incr;
 }
 
 
@@ -4102,9 +4467,10 @@ gimple_omp_for_incr_ptr (gimple gs, size_t i)
 static inline void
 gimple_omp_for_set_incr (gimple gs, size_t i, tree incr)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
-  gs->gimple_omp_for.iter[i].incr = incr;
+  gimple_statement_omp_for *omp_for_stmt =
+    as_a <gimple_statement_omp_for> (gs);
+  gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+  omp_for_stmt->iter[i].incr = incr;
 }
 
 
@@ -4114,8 +4480,9 @@ gimple_omp_for_set_incr (gimple gs, size_t i, tree incr)
 static inline gimple_seq *
 gimple_omp_for_pre_body_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  return &gs->gimple_omp_for.pre_body;
+  gimple_statement_omp_for *omp_for_stmt =
+    as_a <gimple_statement_omp_for> (gs);
+  return &omp_for_stmt->pre_body;
 }
 
 
@@ -4135,8 +4502,9 @@ gimple_omp_for_pre_body (gimple gs)
 static inline void
 gimple_omp_for_set_pre_body (gimple gs, gimple_seq pre_body)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gs->gimple_omp_for.pre_body = pre_body;
+  gimple_statement_omp_for *omp_for_stmt =
+    as_a <gimple_statement_omp_for> (gs);
+  omp_for_stmt->pre_body = pre_body;
 }
 
 
@@ -4145,8 +4513,9 @@ gimple_omp_for_set_pre_body (gimple gs, gimple_seq pre_body)
 static inline tree
 gimple_omp_parallel_clauses (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
-  return gs->gimple_omp_parallel.clauses;
+  const gimple_statement_omp_parallel *omp_parallel_stmt =
+    as_a <const gimple_statement_omp_parallel> (gs);
+  return omp_parallel_stmt->clauses;
 }
 
 
@@ -4155,8 +4524,9 @@ gimple_omp_parallel_clauses (const_gimple gs)
 static inline tree *
 gimple_omp_parallel_clauses_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
-  return &gs->gimple_omp_parallel.clauses;
+  gimple_statement_omp_parallel *omp_parallel_stmt =
+    as_a <gimple_statement_omp_parallel> (gs);
+  return &omp_parallel_stmt->clauses;
 }
 
 
@@ -4166,8 +4536,9 @@ gimple_omp_parallel_clauses_ptr (gimple gs)
 static inline void
 gimple_omp_parallel_set_clauses (gimple gs, tree clauses)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
-  gs->gimple_omp_parallel.clauses = clauses;
+  gimple_statement_omp_parallel *omp_parallel_stmt =
+    as_a <gimple_statement_omp_parallel> (gs);
+  omp_parallel_stmt->clauses = clauses;
 }
 
 
@@ -4176,8 +4547,9 @@ gimple_omp_parallel_set_clauses (gimple gs, tree clauses)
 static inline tree
 gimple_omp_parallel_child_fn (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
-  return gs->gimple_omp_parallel.child_fn;
+  const gimple_statement_omp_parallel *omp_parallel_stmt =
+    as_a <const gimple_statement_omp_parallel> (gs);
+  return omp_parallel_stmt->child_fn;
 }
 
 /* Return a pointer to the child function used to hold the body of
@@ -4186,8 +4558,9 @@ gimple_omp_parallel_child_fn (const_gimple gs)
 static inline tree *
 gimple_omp_parallel_child_fn_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
-  return &gs->gimple_omp_parallel.child_fn;
+  gimple_statement_omp_parallel *omp_parallel_stmt =
+    as_a <gimple_statement_omp_parallel> (gs);
+  return &omp_parallel_stmt->child_fn;
 }
 
 
@@ -4196,8 +4569,9 @@ gimple_omp_parallel_child_fn_ptr (gimple gs)
 static inline void
 gimple_omp_parallel_set_child_fn (gimple gs, tree child_fn)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
-  gs->gimple_omp_parallel.child_fn = child_fn;
+  gimple_statement_omp_parallel *omp_parallel_stmt =
+    as_a <gimple_statement_omp_parallel> (gs);
+  omp_parallel_stmt->child_fn = child_fn;
 }
 
 
@@ -4207,8 +4581,9 @@ gimple_omp_parallel_set_child_fn (gimple gs, tree child_fn)
 static inline tree
 gimple_omp_parallel_data_arg (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
-  return gs->gimple_omp_parallel.data_arg;
+  const gimple_statement_omp_parallel *omp_parallel_stmt =
+    as_a <const gimple_statement_omp_parallel> (gs);
+  return omp_parallel_stmt->data_arg;
 }
 
 
@@ -4217,8 +4592,9 @@ gimple_omp_parallel_data_arg (const_gimple gs)
 static inline tree *
 gimple_omp_parallel_data_arg_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
-  return &gs->gimple_omp_parallel.data_arg;
+  gimple_statement_omp_parallel *omp_parallel_stmt =
+    as_a <gimple_statement_omp_parallel> (gs);
+  return &omp_parallel_stmt->data_arg;
 }
 
 
@@ -4227,8 +4603,9 @@ gimple_omp_parallel_data_arg_ptr (gimple gs)
 static inline void
 gimple_omp_parallel_set_data_arg (gimple gs, tree data_arg)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
-  gs->gimple_omp_parallel.data_arg = data_arg;
+  gimple_statement_omp_parallel *omp_parallel_stmt =
+    as_a <gimple_statement_omp_parallel> (gs);
+  omp_parallel_stmt->data_arg = data_arg;
 }
 
 
@@ -4237,8 +4614,9 @@ gimple_omp_parallel_set_data_arg (gimple gs, tree data_arg)
 static inline tree
 gimple_omp_task_clauses (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return gs->gimple_omp_parallel.clauses;
+  const gimple_statement_omp_task *omp_task_stmt =
+    as_a <const gimple_statement_omp_task> (gs);
+  return omp_task_stmt->clauses;
 }
 
 
@@ -4247,8 +4625,9 @@ gimple_omp_task_clauses (const_gimple gs)
 static inline tree *
 gimple_omp_task_clauses_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return &gs->gimple_omp_parallel.clauses;
+  gimple_statement_omp_task *omp_task_stmt =
+    as_a <gimple_statement_omp_task> (gs);
+  return &omp_task_stmt->clauses;
 }
 
 
@@ -4258,8 +4637,9 @@ gimple_omp_task_clauses_ptr (gimple gs)
 static inline void
 gimple_omp_task_set_clauses (gimple gs, tree clauses)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  gs->gimple_omp_parallel.clauses = clauses;
+  gimple_statement_omp_task *omp_task_stmt =
+    as_a <gimple_statement_omp_task> (gs);
+  omp_task_stmt->clauses = clauses;
 }
 
 
@@ -4268,8 +4648,9 @@ gimple_omp_task_set_clauses (gimple gs, tree clauses)
 static inline tree
 gimple_omp_task_child_fn (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return gs->gimple_omp_parallel.child_fn;
+  const gimple_statement_omp_task *omp_task_stmt =
+    as_a <const gimple_statement_omp_task> (gs);
+  return omp_task_stmt->child_fn;
 }
 
 /* Return a pointer to the child function used to hold the body of
@@ -4278,8 +4659,9 @@ gimple_omp_task_child_fn (const_gimple gs)
 static inline tree *
 gimple_omp_task_child_fn_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return &gs->gimple_omp_parallel.child_fn;
+  gimple_statement_omp_task *omp_task_stmt =
+    as_a <gimple_statement_omp_task> (gs);
+  return &omp_task_stmt->child_fn;
 }
 
 
@@ -4288,8 +4670,9 @@ gimple_omp_task_child_fn_ptr (gimple gs)
 static inline void
 gimple_omp_task_set_child_fn (gimple gs, tree child_fn)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  gs->gimple_omp_parallel.child_fn = child_fn;
+  gimple_statement_omp_task *omp_task_stmt =
+    as_a <gimple_statement_omp_task> (gs);
+  omp_task_stmt->child_fn = child_fn;
 }
 
 
@@ -4299,8 +4682,9 @@ gimple_omp_task_set_child_fn (gimple gs, tree child_fn)
 static inline tree
 gimple_omp_task_data_arg (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return gs->gimple_omp_parallel.data_arg;
+  const gimple_statement_omp_task *omp_task_stmt =
+    as_a <const gimple_statement_omp_task> (gs);
+  return omp_task_stmt->data_arg;
 }
 
 
@@ -4309,8 +4693,9 @@ gimple_omp_task_data_arg (const_gimple gs)
 static inline tree *
 gimple_omp_task_data_arg_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return &gs->gimple_omp_parallel.data_arg;
+  gimple_statement_omp_task *omp_task_stmt =
+    as_a <gimple_statement_omp_task> (gs);
+  return &omp_task_stmt->data_arg;
 }
 
 
@@ -4319,8 +4704,9 @@ gimple_omp_task_data_arg_ptr (gimple gs)
 static inline void
 gimple_omp_task_set_data_arg (gimple gs, tree data_arg)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  gs->gimple_omp_parallel.data_arg = data_arg;
+  gimple_statement_omp_task *omp_task_stmt =
+    as_a <gimple_statement_omp_task> (gs);
+  omp_task_stmt->data_arg = data_arg;
 }
 
 
@@ -4329,9 +4715,9 @@ gimple_omp_task_set_data_arg (gimple gs, tree data_arg)
 static inline tree
 gimple_omp_taskreg_clauses (const_gimple gs)
 {
-  if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
-    GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return gs->gimple_omp_parallel.clauses;
+  const gimple_statement_omp_parallel *omp_parallel_stmt =
+    as_a <const gimple_statement_omp_parallel> (gs);
+  return omp_parallel_stmt->clauses;
 }
 
 
@@ -4340,9 +4726,9 @@ gimple_omp_taskreg_clauses (const_gimple gs)
 static inline tree *
 gimple_omp_taskreg_clauses_ptr (gimple gs)
 {
-  if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
-    GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return &gs->gimple_omp_parallel.clauses;
+  gimple_statement_omp_parallel *omp_parallel_stmt =
+    as_a <gimple_statement_omp_parallel> (gs);
+  return &omp_parallel_stmt->clauses;
 }
 
 
@@ -4352,9 +4738,9 @@ gimple_omp_taskreg_clauses_ptr (gimple gs)
 static inline void
 gimple_omp_taskreg_set_clauses (gimple gs, tree clauses)
 {
-  if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
-    GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  gs->gimple_omp_parallel.clauses = clauses;
+  gimple_statement_omp_parallel *omp_parallel_stmt =
+    as_a <gimple_statement_omp_parallel> (gs);
+  omp_parallel_stmt->clauses = clauses;
 }
 
 
@@ -4363,9 +4749,9 @@ gimple_omp_taskreg_set_clauses (gimple gs, tree clauses)
 static inline tree
 gimple_omp_taskreg_child_fn (const_gimple gs)
 {
-  if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
-    GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return gs->gimple_omp_parallel.child_fn;
+  const gimple_statement_omp_parallel *omp_parallel_stmt =
+    as_a <const gimple_statement_omp_parallel> (gs);
+  return omp_parallel_stmt->child_fn;
 }
 
 /* Return a pointer to the child function used to hold the body of
@@ -4374,9 +4760,9 @@ gimple_omp_taskreg_child_fn (const_gimple gs)
 static inline tree *
 gimple_omp_taskreg_child_fn_ptr (gimple gs)
 {
-  if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
-    GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return &gs->gimple_omp_parallel.child_fn;
+  gimple_statement_omp_parallel *omp_parallel_stmt =
+    as_a <gimple_statement_omp_parallel> (gs);
+  return &omp_parallel_stmt->child_fn;
 }
 
 
@@ -4385,9 +4771,9 @@ gimple_omp_taskreg_child_fn_ptr (gimple gs)
 static inline void
 gimple_omp_taskreg_set_child_fn (gimple gs, tree child_fn)
 {
-  if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
-    GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  gs->gimple_omp_parallel.child_fn = child_fn;
+  gimple_statement_omp_parallel *omp_parallel_stmt =
+    as_a <gimple_statement_omp_parallel> (gs);
+  omp_parallel_stmt->child_fn = child_fn;
 }
 
 
@@ -4397,9 +4783,9 @@ gimple_omp_taskreg_set_child_fn (gimple gs, tree child_fn)
 static inline tree
 gimple_omp_taskreg_data_arg (const_gimple gs)
 {
-  if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
-    GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return gs->gimple_omp_parallel.data_arg;
+  const gimple_statement_omp_parallel *omp_parallel_stmt =
+    as_a <const gimple_statement_omp_parallel> (gs);
+  return omp_parallel_stmt->data_arg;
 }
 
 
@@ -4408,9 +4794,9 @@ gimple_omp_taskreg_data_arg (const_gimple gs)
 static inline tree *
 gimple_omp_taskreg_data_arg_ptr (gimple gs)
 {
-  if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
-    GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return &gs->gimple_omp_parallel.data_arg;
+  gimple_statement_omp_parallel *omp_parallel_stmt =
+    as_a <gimple_statement_omp_parallel> (gs);
+  return &omp_parallel_stmt->data_arg;
 }
 
 
@@ -4419,9 +4805,9 @@ gimple_omp_taskreg_data_arg_ptr (gimple gs)
 static inline void
 gimple_omp_taskreg_set_data_arg (gimple gs, tree data_arg)
 {
-  if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
-    GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  gs->gimple_omp_parallel.data_arg = data_arg;
+  gimple_statement_omp_parallel *omp_parallel_stmt =
+    as_a <gimple_statement_omp_parallel> (gs);
+  omp_parallel_stmt->data_arg = data_arg;
 }
 
 
@@ -4430,8 +4816,9 @@ gimple_omp_taskreg_set_data_arg (gimple gs, tree data_arg)
 static inline tree
 gimple_omp_task_copy_fn (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return gs->gimple_omp_task.copy_fn;
+  const gimple_statement_omp_task *omp_task_stmt =
+    as_a <const gimple_statement_omp_task> (gs);
+  return omp_task_stmt->copy_fn;
 }
 
 /* Return a pointer to the copy function used to hold the body of
@@ -4440,8 +4827,9 @@ gimple_omp_task_copy_fn (const_gimple gs)
 static inline tree *
 gimple_omp_task_copy_fn_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return &gs->gimple_omp_task.copy_fn;
+  gimple_statement_omp_task *omp_task_stmt =
+    as_a <gimple_statement_omp_task> (gs);
+  return &omp_task_stmt->copy_fn;
 }
 
 
@@ -4450,8 +4838,9 @@ gimple_omp_task_copy_fn_ptr (gimple gs)
 static inline void
 gimple_omp_task_set_copy_fn (gimple gs, tree copy_fn)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  gs->gimple_omp_task.copy_fn = copy_fn;
+  gimple_statement_omp_task *omp_task_stmt =
+    as_a <gimple_statement_omp_task> (gs);
+  omp_task_stmt->copy_fn = copy_fn;
 }
 
 
@@ -4460,8 +4849,9 @@ gimple_omp_task_set_copy_fn (gimple gs, tree copy_fn)
 static inline tree
 gimple_omp_task_arg_size (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return gs->gimple_omp_task.arg_size;
+  const gimple_statement_omp_task *omp_task_stmt =
+    as_a <const gimple_statement_omp_task> (gs);
+  return omp_task_stmt->arg_size;
 }
 
 
@@ -4470,8 +4860,9 @@ gimple_omp_task_arg_size (const_gimple gs)
 static inline tree *
 gimple_omp_task_arg_size_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return &gs->gimple_omp_task.arg_size;
+  gimple_statement_omp_task *omp_task_stmt =
+    as_a <gimple_statement_omp_task> (gs);
+  return &omp_task_stmt->arg_size;
 }
 
 
@@ -4480,8 +4871,9 @@ gimple_omp_task_arg_size_ptr (gimple gs)
 static inline void
 gimple_omp_task_set_arg_size (gimple gs, tree arg_size)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  gs->gimple_omp_task.arg_size = arg_size;
+  gimple_statement_omp_task *omp_task_stmt =
+    as_a <gimple_statement_omp_task> (gs);
+  omp_task_stmt->arg_size = arg_size;
 }
 
 
@@ -4490,8 +4882,9 @@ gimple_omp_task_set_arg_size (gimple gs, tree arg_size)
 static inline tree
 gimple_omp_task_arg_align (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return gs->gimple_omp_task.arg_align;
+  const gimple_statement_omp_task *omp_task_stmt =
+    as_a <const gimple_statement_omp_task> (gs);
+  return omp_task_stmt->arg_align;
 }
 
 
@@ -4500,8 +4893,9 @@ gimple_omp_task_arg_align (const_gimple gs)
 static inline tree *
 gimple_omp_task_arg_align_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return &gs->gimple_omp_task.arg_align;
+  gimple_statement_omp_task *omp_task_stmt =
+    as_a <gimple_statement_omp_task> (gs);
+  return &omp_task_stmt->arg_align;
 }
 
 
@@ -4510,8 +4904,9 @@ gimple_omp_task_arg_align_ptr (gimple gs)
 static inline void
 gimple_omp_task_set_arg_align (gimple gs, tree arg_align)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  gs->gimple_omp_task.arg_align = arg_align;
+  gimple_statement_omp_task *omp_task_stmt =
+    as_a <gimple_statement_omp_task> (gs);
+  omp_task_stmt->arg_align = arg_align;
 }
 
 
@@ -4520,8 +4915,9 @@ gimple_omp_task_set_arg_align (gimple gs, tree arg_align)
 static inline tree
 gimple_omp_single_clauses (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_SINGLE);
-  return gs->gimple_omp_single.clauses;
+  const gimple_statement_omp_single *omp_single_stmt =
+    as_a <const gimple_statement_omp_single> (gs);
+  return omp_single_stmt->clauses;
 }
 
 
@@ -4530,8 +4926,9 @@ gimple_omp_single_clauses (const_gimple gs)
 static inline tree *
 gimple_omp_single_clauses_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_SINGLE);
-  return &gs->gimple_omp_single.clauses;
+  gimple_statement_omp_single *omp_single_stmt =
+    as_a <gimple_statement_omp_single> (gs);
+  return &omp_single_stmt->clauses;
 }
 
 
@@ -4540,8 +4937,9 @@ gimple_omp_single_clauses_ptr (gimple gs)
 static inline void
 gimple_omp_single_set_clauses (gimple gs, tree clauses)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_SINGLE);
-  gs->gimple_omp_single.clauses = clauses;
+  gimple_statement_omp_single *omp_single_stmt =
+    as_a <gimple_statement_omp_single> (gs);
+  omp_single_stmt->clauses = clauses;
 }
 
 
@@ -4550,8 +4948,9 @@ gimple_omp_single_set_clauses (gimple gs, tree clauses)
 static inline tree
 gimple_omp_sections_clauses (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
-  return gs->gimple_omp_sections.clauses;
+  const gimple_statement_omp_sections *omp_sections_stmt =
+    as_a <const gimple_statement_omp_sections> (gs);
+  return omp_sections_stmt->clauses;
 }
 
 
@@ -4560,8 +4959,9 @@ gimple_omp_sections_clauses (const_gimple gs)
 static inline tree *
 gimple_omp_sections_clauses_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
-  return &gs->gimple_omp_sections.clauses;
+  gimple_statement_omp_sections *omp_sections_stmt =
+    as_a <gimple_statement_omp_sections> (gs);
+  return &omp_sections_stmt->clauses;
 }
 
 
@@ -4571,8 +4971,9 @@ gimple_omp_sections_clauses_ptr (gimple gs)
 static inline void
 gimple_omp_sections_set_clauses (gimple gs, tree clauses)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
-  gs->gimple_omp_sections.clauses = clauses;
+  gimple_statement_omp_sections *omp_sections_stmt =
+    as_a <gimple_statement_omp_sections> (gs);
+  omp_sections_stmt->clauses = clauses;
 }
 
 
@@ -4582,8 +4983,9 @@ gimple_omp_sections_set_clauses (gimple gs, tree clauses)
 static inline tree
 gimple_omp_sections_control (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
-  return gs->gimple_omp_sections.control;
+  const gimple_statement_omp_sections *omp_sections_stmt =
+    as_a <const gimple_statement_omp_sections> (gs);
+  return omp_sections_stmt->control;
 }
 
 
@@ -4593,8 +4995,9 @@ gimple_omp_sections_control (const_gimple gs)
 static inline tree *
 gimple_omp_sections_control_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
-  return &gs->gimple_omp_sections.control;
+  gimple_statement_omp_sections *omp_sections_stmt =
+    as_a <gimple_statement_omp_sections> (gs);
+  return &omp_sections_stmt->control;
 }
 
 
@@ -4604,8 +5007,9 @@ gimple_omp_sections_control_ptr (gimple gs)
 static inline void
 gimple_omp_sections_set_control (gimple gs, tree control)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
-  gs->gimple_omp_sections.control = control;
+  gimple_statement_omp_sections *omp_sections_stmt =
+    as_a <gimple_statement_omp_sections> (gs);
+  omp_sections_stmt->control = control;
 }
 
 
@@ -4614,10 +5018,11 @@ gimple_omp_sections_set_control (gimple gs, tree control)
 static inline void
 gimple_omp_for_set_cond (gimple gs, size_t i, enum tree_code cond)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
+  gimple_statement_omp_for *omp_for_stmt =
+    as_a <gimple_statement_omp_for> (gs);
   gcc_gimple_checking_assert (TREE_CODE_CLASS (cond) == tcc_comparison
-			      && i < gs->gimple_omp_for.collapse);
-  gs->gimple_omp_for.iter[i].cond = cond;
+			      && i < omp_for_stmt->collapse);
+  omp_for_stmt->iter[i].cond = cond;
 }
 
 
@@ -4626,9 +5031,10 @@ gimple_omp_for_set_cond (gimple gs, size_t i, enum tree_code cond)
 static inline enum tree_code
 gimple_omp_for_cond (const_gimple gs, size_t i)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
-  return gs->gimple_omp_for.iter[i].cond;
+  const gimple_statement_omp_for *omp_for_stmt =
+    as_a <const gimple_statement_omp_for> (gs);
+  gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+  return omp_for_stmt->iter[i].cond;
 }
 
 
@@ -4637,8 +5043,9 @@ gimple_omp_for_cond (const_gimple gs, size_t i)
 static inline void
 gimple_omp_atomic_store_set_val (gimple g, tree val)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
-  g->gimple_omp_atomic_store.val = val;
+  gimple_statement_omp_atomic_store *omp_atomic_store_stmt =
+    as_a <gimple_statement_omp_atomic_store> (g);
+  omp_atomic_store_stmt->val = val;
 }
 
 
@@ -4647,8 +5054,9 @@ gimple_omp_atomic_store_set_val (gimple g, tree val)
 static inline tree
 gimple_omp_atomic_store_val (const_gimple g)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
-  return g->gimple_omp_atomic_store.val;
+  const gimple_statement_omp_atomic_store *omp_atomic_store_stmt =
+    as_a <const gimple_statement_omp_atomic_store> (g);
+  return omp_atomic_store_stmt->val;
 }
 
 
@@ -4657,8 +5065,9 @@ gimple_omp_atomic_store_val (const_gimple g)
 static inline tree *
 gimple_omp_atomic_store_val_ptr (gimple g)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
-  return &g->gimple_omp_atomic_store.val;
+  gimple_statement_omp_atomic_store *omp_atomic_store_stmt =
+    as_a <gimple_statement_omp_atomic_store> (g);
+  return &omp_atomic_store_stmt->val;
 }
 
 
@@ -4667,8 +5076,9 @@ gimple_omp_atomic_store_val_ptr (gimple g)
 static inline void
 gimple_omp_atomic_load_set_lhs (gimple g, tree lhs)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
-  g->gimple_omp_atomic_load.lhs = lhs;
+  gimple_statement_omp_atomic_load *omp_atomic_load_stmt =
+    as_a <gimple_statement_omp_atomic_load> (g);
+  omp_atomic_load_stmt->lhs = lhs;
 }
 
 
@@ -4677,8 +5087,9 @@ gimple_omp_atomic_load_set_lhs (gimple g, tree lhs)
 static inline tree
 gimple_omp_atomic_load_lhs (const_gimple g)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
-  return g->gimple_omp_atomic_load.lhs;
+  const gimple_statement_omp_atomic_load *omp_atomic_load_stmt =
+    as_a <const gimple_statement_omp_atomic_load> (g);
+  return omp_atomic_load_stmt->lhs;
 }
 
 
@@ -4687,8 +5098,9 @@ gimple_omp_atomic_load_lhs (const_gimple g)
 static inline tree *
 gimple_omp_atomic_load_lhs_ptr (gimple g)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
-  return &g->gimple_omp_atomic_load.lhs;
+  gimple_statement_omp_atomic_load *omp_atomic_load_stmt =
+    as_a <gimple_statement_omp_atomic_load> (g);
+  return &omp_atomic_load_stmt->lhs;
 }
 
 
@@ -4697,8 +5109,9 @@ gimple_omp_atomic_load_lhs_ptr (gimple g)
 static inline void
 gimple_omp_atomic_load_set_rhs (gimple g, tree rhs)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
-  g->gimple_omp_atomic_load.rhs = rhs;
+  gimple_statement_omp_atomic_load *omp_atomic_load_stmt =
+    as_a <gimple_statement_omp_atomic_load> (g);
+  omp_atomic_load_stmt->rhs = rhs;
 }
 
 
@@ -4707,8 +5120,9 @@ gimple_omp_atomic_load_set_rhs (gimple g, tree rhs)
 static inline tree
 gimple_omp_atomic_load_rhs (const_gimple g)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
-  return g->gimple_omp_atomic_load.rhs;
+  const gimple_statement_omp_atomic_load *omp_atomic_load_stmt =
+    as_a <const gimple_statement_omp_atomic_load> (g);
+  return omp_atomic_load_stmt->rhs;
 }
 
 
@@ -4717,8 +5131,9 @@ gimple_omp_atomic_load_rhs (const_gimple g)
 static inline tree *
 gimple_omp_atomic_load_rhs_ptr (gimple g)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
-  return &g->gimple_omp_atomic_load.rhs;
+  gimple_statement_omp_atomic_load *omp_atomic_load_stmt =
+    as_a <gimple_statement_omp_atomic_load> (g);
+  return &omp_atomic_load_stmt->rhs;
 }
 
 
@@ -4727,8 +5142,9 @@ gimple_omp_atomic_load_rhs_ptr (gimple g)
 static inline tree
 gimple_omp_continue_control_def (const_gimple g)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
-  return g->gimple_omp_continue.control_def;
+  const gimple_statement_omp_continue *omp_continue_stmt =
+    as_a <const gimple_statement_omp_continue> (g);
+  return omp_continue_stmt->control_def;
 }
 
 /* The same as above, but return the address.  */
@@ -4736,8 +5152,9 @@ gimple_omp_continue_control_def (const_gimple g)
 static inline tree *
 gimple_omp_continue_control_def_ptr (gimple g)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
-  return &g->gimple_omp_continue.control_def;
+  gimple_statement_omp_continue *omp_continue_stmt =
+    as_a <gimple_statement_omp_continue> (g);
+  return &omp_continue_stmt->control_def;
 }
 
 /* Set the definition of the control variable in a GIMPLE_OMP_CONTINUE.  */
@@ -4745,8 +5162,9 @@ gimple_omp_continue_control_def_ptr (gimple g)
 static inline void
 gimple_omp_continue_set_control_def (gimple g, tree def)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
-  g->gimple_omp_continue.control_def = def;
+  gimple_statement_omp_continue *omp_continue_stmt =
+    as_a <gimple_statement_omp_continue> (g);
+  omp_continue_stmt->control_def = def;
 }
 
 
@@ -4755,8 +5173,9 @@ gimple_omp_continue_set_control_def (gimple g, tree def)
 static inline tree
 gimple_omp_continue_control_use (const_gimple g)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
-  return g->gimple_omp_continue.control_use;
+  const gimple_statement_omp_continue *omp_continue_stmt =
+    as_a <const gimple_statement_omp_continue> (g);
+  return omp_continue_stmt->control_use;
 }
 
 
@@ -4765,8 +5184,9 @@ gimple_omp_continue_control_use (const_gimple g)
 static inline tree *
 gimple_omp_continue_control_use_ptr (gimple g)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
-  return &g->gimple_omp_continue.control_use;
+  gimple_statement_omp_continue *omp_continue_stmt =
+    as_a <gimple_statement_omp_continue> (g);
+  return &omp_continue_stmt->control_use;
 }
 
 
@@ -4775,8 +5195,9 @@ gimple_omp_continue_control_use_ptr (gimple g)
 static inline void
 gimple_omp_continue_set_control_use (gimple g, tree use)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
-  g->gimple_omp_continue.control_use = use;
+  gimple_statement_omp_continue *omp_continue_stmt =
+    as_a <gimple_statement_omp_continue> (g);
+  omp_continue_stmt->control_use = use;
 }
 
 /* Return a pointer to the body for the GIMPLE_TRANSACTION statement GS.  */
@@ -4784,8 +5205,9 @@ gimple_omp_continue_set_control_use (gimple g, tree use)
 static inline gimple_seq *
 gimple_transaction_body_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_TRANSACTION);
-  return &gs->gimple_transaction.body;
+  gimple_statement_transaction *transaction_stmt =
+    as_a <gimple_statement_transaction> (gs);
+  return &transaction_stmt->body;
 }
 
 /* Return the body for the GIMPLE_TRANSACTION statement GS.  */
@@ -4801,15 +5223,17 @@ gimple_transaction_body (gimple gs)
 static inline tree
 gimple_transaction_label (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_TRANSACTION);
-  return gs->gimple_transaction.label;
+  const gimple_statement_transaction *transaction_stmt =
+    as_a <const gimple_statement_transaction> (gs);
+  return transaction_stmt->label;
 }
 
 static inline tree *
 gimple_transaction_label_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_TRANSACTION);
-  return &gs->gimple_transaction.label;
+  gimple_statement_transaction *transaction_stmt =
+    as_a <gimple_statement_transaction> (gs);
+  return &transaction_stmt->label;
 }
 
 /* Return the subcode associated with a GIMPLE_TRANSACTION.  */
@@ -4818,7 +5242,7 @@ static inline unsigned int
 gimple_transaction_subcode (const_gimple gs)
 {
   GIMPLE_CHECK (gs, GIMPLE_TRANSACTION);
-  return gs->gsbase.subcode;
+  return gs->subcode;
 }
 
 /* Set BODY to be the body for the GIMPLE_TRANSACTION statement GS.  */
@@ -4826,8 +5250,9 @@ gimple_transaction_subcode (const_gimple gs)
 static inline void
 gimple_transaction_set_body (gimple gs, gimple_seq body)
 {
-  GIMPLE_CHECK (gs, GIMPLE_TRANSACTION);
-  gs->gimple_transaction.body = body;
+  gimple_statement_transaction *transaction_stmt =
+    as_a <gimple_statement_transaction> (gs);
+  transaction_stmt->body = body;
 }
 
 /* Set the label associated with a GIMPLE_TRANSACTION.  */
@@ -4835,8 +5260,9 @@ gimple_transaction_set_body (gimple gs, gimple_seq body)
 static inline void
 gimple_transaction_set_label (gimple gs, tree label)
 {
-  GIMPLE_CHECK (gs, GIMPLE_TRANSACTION);
-  gs->gimple_transaction.label = label;
+  gimple_statement_transaction *transaction_stmt =
+    as_a <gimple_statement_transaction> (gs);
+  transaction_stmt->label = label;
 }
 
 /* Set the subcode associated with a GIMPLE_TRANSACTION.  */
@@ -4845,7 +5271,7 @@ static inline void
 gimple_transaction_set_subcode (gimple gs, unsigned int subcode)
 {
   GIMPLE_CHECK (gs, GIMPLE_TRANSACTION);
-  gs->gsbase.subcode = subcode;
+  gs->subcode = subcode;
 }
 
 
@@ -4932,7 +5358,7 @@ static inline enum br_predictor
 gimple_predict_predictor (gimple gs)
 {
   GIMPLE_CHECK (gs, GIMPLE_PREDICT);
-  return (enum br_predictor) (gs->gsbase.subcode & ~GF_PREDICT_TAKEN);
+  return (enum br_predictor) (gs->subcode & ~GF_PREDICT_TAKEN);
 }
 
 
@@ -4942,7 +5368,7 @@ static inline void
 gimple_predict_set_predictor (gimple gs, enum br_predictor predictor)
 {
   GIMPLE_CHECK (gs, GIMPLE_PREDICT);
-  gs->gsbase.subcode = (gs->gsbase.subcode & GF_PREDICT_TAKEN)
+  gs->subcode = (gs->subcode & GF_PREDICT_TAKEN)
 		       | (unsigned) predictor;
 }
 
@@ -4953,7 +5379,7 @@ static inline enum prediction
 gimple_predict_outcome (gimple gs)
 {
   GIMPLE_CHECK (gs, GIMPLE_PREDICT);
-  return (gs->gsbase.subcode & GF_PREDICT_TAKEN) ? TAKEN : NOT_TAKEN;
+  return (gs->subcode & GF_PREDICT_TAKEN) ? TAKEN : NOT_TAKEN;
 }
 
 
@@ -4964,9 +5390,9 @@ gimple_predict_set_outcome (gimple gs, enum prediction outcome)
 {
   GIMPLE_CHECK (gs, GIMPLE_PREDICT);
   if (outcome == TAKEN)
-    gs->gsbase.subcode |= GF_PREDICT_TAKEN;
+    gs->subcode |= GF_PREDICT_TAKEN;
   else
-    gs->gsbase.subcode &= ~GF_PREDICT_TAKEN;
+    gs->subcode &= ~GF_PREDICT_TAKEN;
 }
 
 
@@ -5105,7 +5531,7 @@ gsi_end_p (gimple_stmt_iterator i)
 static inline bool
 gsi_one_before_end_p (gimple_stmt_iterator i)
 {
-  return i.ptr != NULL && i.ptr->gsbase.next == NULL;
+  return i.ptr != NULL && i.ptr->next == NULL;
 }
 
 
@@ -5114,7 +5540,7 @@ gsi_one_before_end_p (gimple_stmt_iterator i)
 static inline void
 gsi_next (gimple_stmt_iterator *i)
 {
-  i->ptr = i->ptr->gsbase.next;
+  i->ptr = i->ptr->next;
 }
 
 /* Advance the iterator to the previous gimple statement.  */
@@ -5122,8 +5548,8 @@ gsi_next (gimple_stmt_iterator *i)
 static inline void
 gsi_prev (gimple_stmt_iterator *i)
 {
-  gimple prev = i->ptr->gsbase.prev;
-  if (prev->gsbase.next)
+  gimple prev = i->ptr->prev;
+  if (prev->next)
     i->ptr = prev;
   else
     i->ptr = NULL;
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index af26c85..6e134a5 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -2531,7 +2531,7 @@ copy_debug_stmt (gimple stmt, copy_body_data *id)
 		    && TREE_CODE ((**debug_args)[i + 1]) == DEBUG_EXPR_DECL)
 		  {
 		    t = (**debug_args)[i + 1];
-		    stmt->gsbase.subcode = GIMPLE_DEBUG_BIND;
+		    stmt->subcode = GIMPLE_DEBUG_BIND;
 		    gimple_debug_bind_set_value (stmt, t);
 		    break;
 		  }
diff --git a/gcc/tree-phinodes.c b/gcc/tree-phinodes.c
index 4499753..60414e5 100644
--- a/gcc/tree-phinodes.c
+++ b/gcc/tree-phinodes.c
@@ -179,7 +179,7 @@ make_phi_node (tree var, int len)
   memset (phi, 0, (sizeof (struct gimple_statement_phi)
 		   - sizeof (struct phi_arg_d)
 		   + sizeof (struct phi_arg_d) * len));
-  phi->gsbase.code = GIMPLE_PHI;
+  phi->code = GIMPLE_PHI;
   gimple_init_singleton (phi);
   phi->gimple_phi.nargs = len;
   phi->gimple_phi.capacity = capacity;
-- 
1.7.11.7

