From fe6d5759f00da73ed2d1f62e520bc7ba3f6669c6 Mon Sep 17 00:00:00 2001
From: David Malcolm <dmalcolm@redhat.com>
Date: Mon, 18 Nov 2013 11:53:57 -0500
Subject: [PATCH 3/6] Automated part of conversion of gimple types to use C++
 inheritance

gcc/

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

	* 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-iterator.h (gsi_one_before_end_p): Likewise.
	(gsi_next): Likewise.
	(gsi_prev): Likewise.
	* gimple-pretty-print.c (dump_gimple_debug): Likewise.
	* gimple-ssa.h (gimple_vuse_op): Likewise.
	(gimple_vdef_op): 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_omp_atomic_set_seq_cst): 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_with_bounds_p): Likewise.
	(gimple_call_set_with_bounds): 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_omp_for_set_kind): Likewise.
	(gimple_omp_for_set_combined_p): Likewise.
	(gimple_omp_for_set_combined_into_p): Likewise.
	(gimple_omp_target_set_kind): 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.
	(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_teams_set_clauses): Likewise.
	(gimple_omp_teams_clauses_ptr): Likewise.
	(gimple_omp_teams_clauses): Likewise.
	(gimple_omp_target_set_data_arg): Likewise.
	(gimple_omp_target_data_arg_ptr): Likewise.
	(gimple_omp_target_data_arg): Likewise.
	(gimple_omp_target_set_child_fn): Likewise.
	(gimple_omp_target_child_fn_ptr): Likewise.
	(gimple_omp_target_child_fn): Likewise.
	(gimple_omp_target_set_clauses): Likewise.
	(gimple_omp_target_clauses_ptr): Likewise.
	(gimple_omp_target_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_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_return_lhs_ptr): Likewise.
	(gimple_omp_return_lhs): Likewise.
	(gimple_omp_return_set_lhs): 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): 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-iterator.h     |    8 +-
 gcc/gimple-pretty-print.c |    2 +-
 gcc/gimple-ssa.h          |   16 +-
 gcc/gimple-streamer-in.c  |    8 +-
 gcc/gimple-streamer-out.c |    2 +-
 gcc/gimple.c              |   16 +-
 gcc/gimple.h              | 1367 ++++++++++++++++++++++++++++++---------------
 gcc/tree-inline.c         |    2 +-
 gcc/tree-phinodes.c       |    2 +-
 10 files changed, 968 insertions(+), 527 deletions(-)

diff --git a/gcc/gimple-iterator.c b/gcc/gimple-iterator.c
index b945389..557bf35 100644
--- a/gcc/gimple-iterator.c
+++ b/gcc/gimple-iterator.c
@@ -68,7 +68,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)
@@ -86,7 +86,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;
@@ -124,7 +124,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);
@@ -132,13 +132,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
     {
@@ -149,11 +149,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);
@@ -242,7 +242,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.  */
@@ -252,20 +252,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);
     }
@@ -347,15 +347,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;
 }
@@ -371,17 +371,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);
 
@@ -402,10 +402,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;
 
@@ -415,8 +415,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;
 }
 
 
@@ -576,20 +576,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-iterator.h b/gcc/gimple-iterator.h
index 24045f5..11b1276 100644
--- a/gcc/gimple-iterator.h
+++ b/gcc/gimple-iterator.h
@@ -168,7 +168,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;
 }
 
 /* Advance the iterator to the next gimple statement.  */
@@ -176,7 +176,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.  */
@@ -184,8 +184,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/gimple-pretty-print.c b/gcc/gimple-pretty-print.c
index 711bc75..b14f317 100644
--- a/gcc/gimple-pretty-print.c
+++ b/gcc/gimple-pretty-print.c
@@ -1072,7 +1072,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-ssa.h b/gcc/gimple-ssa.h
index 23aa099..50b48bb 100644
--- a/gcc/gimple-ssa.h
+++ b/gcc/gimple-ssa.h
@@ -108,11 +108,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;
 }
@@ -122,10 +124,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;
 }
 
diff --git a/gcc/gimple-streamer-in.c b/gcc/gimple-streamer-in.c
index 6f8f51a..7fb07d1 100644
--- a/gcc/gimple-streamer-in.c
+++ b/gcc/gimple-streamer-in.c
@@ -99,12 +99,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 4d0664f..0d6b6a6 100644
--- a/gcc/gimple-streamer-out.c
+++ b/gcc/gimple-streamer-out.c
@@ -78,7 +78,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 1c88b00..758660f 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -93,7 +93,7 @@ static const char * const gimple_alloc_kind_names[] = {
 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
@@ -131,7 +131,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;
@@ -145,7 +145,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;
 }
 
 
@@ -280,7 +280,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;
@@ -1111,8 +1111,8 @@ gimple_check_failed (const_gimple gs, const char *file, int line,
       		  gimple_code_name[code],
 		  get_tree_code_name (subcode),
 		  gimple_code_name[gimple_code (gs)],
-		  gs->gsbase.subcode > 0
-		    ? get_tree_code_name ((enum tree_code) gs->gsbase.subcode)
+		  gs->subcode > 0
+		    ? get_tree_code_name ((enum tree_code) gs->subcode)
 		    : "",
 		  function, trim_filename (file), line);
 }
@@ -1306,7 +1306,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;
@@ -1447,7 +1447,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 65c24ee..ed94343 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -707,6 +707,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 || gs->code == GIMPLE_OMP_RETURN;
+}
+
+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 || gs->code == GIMPLE_OMP_TASK || gs->code == GIMPLE_OMP_TARGET;
+}
+
+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 || gs->code == GIMPLE_OMP_TEAMS;
+}
+
+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 || gs->code == GIMPLE_OMP_RETURN;
+}
+
+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 || gs->code == GIMPLE_OMP_TASK || gs->code == GIMPLE_OMP_TARGET;
+}
+
+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 || gs->code == GIMPLE_OMP_TEAMS;
+}
+
+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;
+}
+
 /* Offset in bytes to the location of the operand vector.
    Zero if there is no operand vector for this tuple structure.  */
 extern size_t const gimple_ops_offset_[];
@@ -880,7 +1184,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;
 }
 
 
@@ -899,7 +1203,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;
 }
 
 
@@ -960,7 +1264,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;
 }
 
 
@@ -1023,7 +1327,7 @@ gimple_has_substatements (gimple g)
 static inline basic_block
 gimple_bb (const_gimple g)
 {
-  return g->gsbase.bb;
+  return g->bb;
 }
 
 
@@ -1032,7 +1336,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);
 }
 
 
@@ -1042,10 +1346,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);
 }
 
 
@@ -1054,7 +1358,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.  */
@@ -1062,7 +1366,7 @@ gimple_location (const_gimple g)
 static inline const location_t *
 gimple_location_ptr (const_gimple g)
 {
-  return &g->gsbase.location;
+  return &g->location;
 }
 
 
@@ -1071,7 +1375,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;
 }
 
 
@@ -1116,7 +1420,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.  */
@@ -1124,7 +1428,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.  */
@@ -1132,7 +1436,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;
 }
 
 
@@ -1141,7 +1445,7 @@ gimple_set_visited (gimple stmt, bool visited_p)
 static inline bool
 gimple_visited_p (gimple stmt)
 {
-  return stmt->gsbase.visited;
+  return stmt->visited;
 }
 
 
@@ -1151,9 +1455,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);
 }
 
 
@@ -1162,7 +1466,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);
 }
 
 
@@ -1171,7 +1475,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;
 }
 
 
@@ -1180,7 +1484,7 @@ gimple_set_uid (gimple g, unsigned uid)
 static inline unsigned
 gimple_uid (const_gimple g)
 {
-  return g->gsbase.uid;
+  return g->uid;
 }
 
 
@@ -1189,8 +1493,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;
 }
 
 
@@ -1241,9 +1545,11 @@ gimple_set_use_ops (gimple g, struct use_optype_d *use)
 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.  */
@@ -1251,9 +1557,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.  */
@@ -1261,9 +1569,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.  */
@@ -1271,9 +1581,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.  */
@@ -1303,7 +1615,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;
 }
 
 
@@ -1314,7 +1626,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;
 }
 
 
@@ -1329,7 +1641,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);
@@ -1344,7 +1656,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;
 }
@@ -1356,7 +1668,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 STMT is in a transaction.  */
@@ -1383,7 +1695,7 @@ gimple_omp_subcode (const_gimple s)
 {
   gcc_gimple_checking_assert (gimple_code (s) >= GIMPLE_OMP_ATOMIC_LOAD
 	      && gimple_code (s) <= GIMPLE_OMP_TEAMS);
-  return s->gsbase.subcode;
+  return s->subcode;
 }
 
 /* Set the subcode for OMP statement S to SUBCODE.  */
@@ -1394,7 +1706,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.  */
@@ -1403,7 +1715,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;
 }
 
 
@@ -1423,8 +1735,9 @@ gimple_omp_return_nowait_p (const_gimple g)
 static inline void
 gimple_omp_return_set_lhs (gimple g, tree lhs)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_RETURN);
-  g->gimple_omp_atomic_store.val = lhs;
+  gimple_statement_omp_atomic_store *omp_atomic_store_stmt =
+    as_a <gimple_statement_omp_atomic_store> (g);
+  omp_atomic_store_stmt->val = lhs;
 }
 
 
@@ -1433,8 +1746,9 @@ gimple_omp_return_set_lhs (gimple g, tree lhs)
 static inline tree
 gimple_omp_return_lhs (const_gimple g)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_RETURN);
-  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;
 }
 
 
@@ -1443,8 +1757,9 @@ gimple_omp_return_lhs (const_gimple g)
 static inline tree *
 gimple_omp_return_lhs_ptr (gimple g)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_RETURN);
-  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;
 }
 
 
@@ -1465,7 +1780,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;
 }
 
 
@@ -1488,9 +1803,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;
 }
 
 
@@ -1513,7 +1828,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;
 }
 
 
@@ -1536,7 +1851,7 @@ gimple_omp_atomic_set_seq_cst (gimple g)
 {
   if (gimple_code (g) != GIMPLE_OMP_ATOMIC_LOAD)
     GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
-  g->gsbase.subcode |= GF_OMP_ATOMIC_SEQ_CST;
+  g->subcode |= GF_OMP_ATOMIC_SEQ_CST;
 }
 
 
@@ -1545,7 +1860,7 @@ gimple_omp_atomic_set_seq_cst (gimple g)
 static inline unsigned
 gimple_num_ops (const_gimple gs)
 {
-  return gs->gsbase.num_ops;
+  return gs->num_ops;
 }
 
 
@@ -1554,7 +1869,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;
 }
 
 
@@ -1785,7 +2100,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.  */
@@ -1794,7 +2109,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;
 }
 
 
@@ -1808,7 +2123,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.  */
@@ -1826,7 +2141,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;
 }
 
 
@@ -1951,7 +2266,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;
 }
 
 
@@ -1962,7 +2277,7 @@ static inline bool
 gimple_call_with_bounds_p (const_gimple gs)
 {
   GIMPLE_CHECK (gs, GIMPLE_CALL);
-  return (gs->gsbase.subcode & GF_CALL_WITH_BOUNDS) != 0;
+  return (gs->subcode & GF_CALL_WITH_BOUNDS) != 0;
 }
 
 
@@ -1974,9 +2289,9 @@ gimple_call_set_with_bounds (gimple gs, bool with_bounds)
 {
   GIMPLE_CHECK (gs, GIMPLE_CALL);
   if (with_bounds)
-    gs->gsbase.subcode |= GF_CALL_WITH_BOUNDS;
+    gs->subcode |= GF_CALL_WITH_BOUNDS;
   else
-    gs->gsbase.subcode &= ~GF_CALL_WITH_BOUNDS;
+    gs->subcode &= ~GF_CALL_WITH_BOUNDS;
 }
 
 
@@ -1995,10 +2310,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.  */
@@ -2006,9 +2322,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;
 }
 
 
@@ -2060,9 +2376,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;
 }
 
 
@@ -2175,9 +2491,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;
 }
 
 
@@ -2187,7 +2503,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;
 }
 
 
@@ -2200,9 +2516,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;
 }
 
 
@@ -2212,7 +2528,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;
 }
 
 
@@ -2224,9 +2540,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;
 }
 
 
@@ -2236,7 +2552,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;
 }
 
 
@@ -2248,9 +2564,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;
 }
 
 
@@ -2261,7 +2577,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;
 }
 
 
@@ -2283,9 +2599,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.  */
@@ -2307,9 +2623,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.  */
@@ -2318,7 +2634,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.  */
@@ -2328,7 +2644,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;
 }
 
 
@@ -2338,8 +2654,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;
 }
 
 
@@ -2349,8 +2665,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;
 }
 
 
@@ -2372,7 +2688,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;
 }
 
 
@@ -2382,7 +2698,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;
 }
 
 
@@ -2498,7 +2814,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;
 }
 
 
@@ -2509,7 +2825,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)',
@@ -2618,8 +2934,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;
 }
 
 
@@ -2629,8 +2946,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;
 }
 
 
@@ -2640,16 +2957,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.  */
@@ -2667,8 +2984,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;
 }
 
 
@@ -2677,8 +2994,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);
 }
 
 
@@ -2687,8 +3004,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);
 }
 
 
@@ -2698,8 +3015,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;
 }
 
 
@@ -2709,10 +3027,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;
 }
 
 
@@ -2721,8 +3039,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;
 }
 
 
@@ -2731,8 +3050,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;
 }
 
 
@@ -2741,8 +3061,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.  */
@@ -2750,8 +3071,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.  */
@@ -2759,9 +3081,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.  */
@@ -2769,9 +3092,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);
 }
 
 
@@ -2780,10 +3104,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);
 }
 
 
@@ -2792,8 +3116,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);
 }
 
@@ -2802,8 +3127,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);
 }
 
@@ -2813,8 +3139,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);
 }
@@ -2825,9 +3151,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);
 }
 
 
@@ -2836,10 +3163,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.  */
@@ -2847,9 +3174,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.  */
@@ -2857,10 +3185,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
@@ -2869,8 +3197,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;
 }
 
 
@@ -2880,7 +3209,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;
 }
 
 
@@ -2891,9 +3220,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;
 }
 
 
@@ -2904,9 +3233,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;
 }
 
 
@@ -2916,7 +3245,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;
 }
 
 
@@ -2925,8 +3254,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;
 }
 
 
@@ -2935,8 +3265,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;
 }
 
 
@@ -2946,8 +3276,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;
 }
 
 
@@ -2966,8 +3296,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;
 }
 
 
@@ -2976,8 +3306,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;
 }
 
 
@@ -2986,8 +3316,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;
 }
 
 
@@ -2997,8 +3328,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;
 }
 
 
@@ -3008,8 +3340,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;
 }
 
 
@@ -3028,8 +3361,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;
 }
 
 
@@ -3039,8 +3373,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.  */
@@ -3048,8 +3383,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.  */
@@ -3057,8 +3392,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.  */
@@ -3066,8 +3401,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
@@ -3079,8 +3415,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
@@ -3092,15 +3429,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. */
@@ -3112,7 +3451,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);
 }
 
 
@@ -3125,7 +3464,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;
 }
 
 
@@ -3135,7 +3474,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;
 }
 
 
@@ -3145,8 +3484,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;
 }
 
 
@@ -3165,8 +3504,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;
 }
 
 
@@ -3187,9 +3526,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;
 }
 
 
@@ -3199,8 +3538,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;
 }
 
 
@@ -3210,8 +3549,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;
 }
 
 
@@ -3220,8 +3559,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;
 }
 
 
@@ -3239,8 +3578,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;
 }
 
 
@@ -3250,7 +3589,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;
 }
 
 
@@ -3260,7 +3599,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;
 }
 
 
@@ -3269,8 +3608,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;
 }
 
 
@@ -3281,8 +3621,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;
 }
 
 
@@ -3291,8 +3632,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.  */
@@ -3300,8 +3642,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.  */
@@ -3309,8 +3651,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;
 }
@@ -3322,9 +3664,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
@@ -3333,9 +3675,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 PHI nodes for basic block BB, or NULL if there are no
@@ -3420,8 +3762,9 @@ gimple_phi_arg_has_location (gimple gs, size_t i)
 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.  */
@@ -3429,8 +3772,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.  */
@@ -3438,8 +3782,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.  */
@@ -3447,8 +3792,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.  */
@@ -3561,7 +3907,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;
 }
@@ -3653,7 +3999,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;
 }
@@ -3758,8 +4104,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;
 }
 
 
@@ -3768,8 +4115,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;
 }
 
 
@@ -3778,8 +4126,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;
 }
 
 
@@ -3799,7 +4148,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);
 }
 
@@ -3823,9 +4172,9 @@ gimple_omp_for_set_combined_p (gimple g, bool combined_p)
 {
   GIMPLE_CHECK (g, GIMPLE_OMP_FOR);
   if (combined_p)
-    g->gsbase.subcode |= GF_OMP_FOR_COMBINED;
+    g->subcode |= GF_OMP_FOR_COMBINED;
   else
-    g->gsbase.subcode &= ~GF_OMP_FOR_COMBINED;
+    g->subcode &= ~GF_OMP_FOR_COMBINED;
 }
 
 
@@ -3848,9 +4197,9 @@ gimple_omp_for_set_combined_into_p (gimple g, bool combined_p)
 {
   GIMPLE_CHECK (g, GIMPLE_OMP_FOR);
   if (combined_p)
-    g->gsbase.subcode |= GF_OMP_FOR_COMBINED_INTO;
+    g->subcode |= GF_OMP_FOR_COMBINED_INTO;
   else
-    g->gsbase.subcode &= ~GF_OMP_FOR_COMBINED_INTO;
+    g->subcode &= ~GF_OMP_FOR_COMBINED_INTO;
 }
 
 
@@ -3859,8 +4208,9 @@ gimple_omp_for_set_combined_into_p (gimple g, bool combined_p)
 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;
 }
 
 
@@ -3869,8 +4219,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;
 }
 
 
@@ -3879,8 +4230,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;
 }
 
 
@@ -3889,8 +4241,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;
 }
 
 
@@ -3899,9 +4252,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;
 }
 
 
@@ -3910,9 +4264,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;
 }
 
 
@@ -3921,9 +4276,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;
 }
 
 
@@ -3932,9 +4288,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;
 }
 
 
@@ -3943,9 +4300,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;
 }
 
 
@@ -3954,9 +4312,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;
 }
 
 
@@ -3965,9 +4324,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;
 }
 
 
@@ -3976,9 +4336,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;
 }
 
 
@@ -3987,9 +4348,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;
 }
 
 
@@ -3998,9 +4360,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;
 }
 
 
@@ -4009,9 +4372,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;
 }
 
 
@@ -4020,9 +4384,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;
 }
 
 
@@ -4032,8 +4397,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;
 }
 
 
@@ -4053,8 +4419,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;
 }
 
 
@@ -4063,8 +4430,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;
 }
 
 
@@ -4073,8 +4441,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;
 }
 
 
@@ -4084,8 +4453,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;
 }
 
 
@@ -4094,8 +4464,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
@@ -4104,8 +4475,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;
 }
 
 
@@ -4114,8 +4486,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;
 }
 
 
@@ -4125,8 +4498,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;
 }
 
 
@@ -4135,8 +4509,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;
 }
 
 
@@ -4145,8 +4520,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;
 }
 
 
@@ -4155,8 +4531,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;
 }
 
 
@@ -4165,8 +4542,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;
 }
 
 
@@ -4176,8 +4554,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;
 }
 
 
@@ -4186,8 +4565,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
@@ -4196,8 +4576,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;
 }
 
 
@@ -4206,8 +4587,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;
 }
 
 
@@ -4217,8 +4599,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;
 }
 
 
@@ -4227,8 +4610,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;
 }
 
 
@@ -4237,8 +4621,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;
 }
 
 
@@ -4247,9 +4632,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;
 }
 
 
@@ -4258,9 +4643,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;
 }
 
 
@@ -4270,9 +4655,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;
 }
 
 
@@ -4281,9 +4666,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
@@ -4292,9 +4677,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;
 }
 
 
@@ -4303,9 +4688,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;
 }
 
 
@@ -4315,9 +4700,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;
 }
 
 
@@ -4326,9 +4711,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;
 }
 
 
@@ -4337,9 +4722,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;
 }
 
 
@@ -4348,8 +4733,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
@@ -4358,8 +4744,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;
 }
 
 
@@ -4368,8 +4755,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;
 }
 
 
@@ -4378,8 +4766,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;
 }
 
 
@@ -4388,8 +4777,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;
 }
 
 
@@ -4398,8 +4788,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;
 }
 
 
@@ -4408,8 +4799,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;
 }
 
 
@@ -4418,8 +4810,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;
 }
 
 
@@ -4428,8 +4821,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;
 }
 
 
@@ -4438,8 +4832,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;
 }
 
 
@@ -4448,8 +4843,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;
 }
 
 
@@ -4458,8 +4854,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;
 }
 
 
@@ -4468,8 +4865,9 @@ gimple_omp_single_set_clauses (gimple gs, tree clauses)
 static inline tree
 gimple_omp_target_clauses (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
-  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;
 }
 
 
@@ -4478,8 +4876,9 @@ gimple_omp_target_clauses (const_gimple gs)
 static inline tree *
 gimple_omp_target_clauses_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
-  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;
 }
 
 
@@ -4488,8 +4887,9 @@ gimple_omp_target_clauses_ptr (gimple gs)
 static inline void
 gimple_omp_target_set_clauses (gimple gs, tree clauses)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
-  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;
 }
 
 
@@ -4509,7 +4909,7 @@ static inline void
 gimple_omp_target_set_kind (gimple g, int kind)
 {
   GIMPLE_CHECK (g, GIMPLE_OMP_TARGET);
-  g->gsbase.subcode = (g->gsbase.subcode & ~GF_OMP_TARGET_KIND_MASK)
+  g->subcode = (g->subcode & ~GF_OMP_TARGET_KIND_MASK)
 		      | (kind & GF_OMP_TARGET_KIND_MASK);
 }
 
@@ -4519,8 +4919,9 @@ gimple_omp_target_set_kind (gimple g, int kind)
 static inline tree
 gimple_omp_target_child_fn (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
-  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
@@ -4529,8 +4930,9 @@ gimple_omp_target_child_fn (const_gimple gs)
 static inline tree *
 gimple_omp_target_child_fn_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
-  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;
 }
 
 
@@ -4539,8 +4941,9 @@ gimple_omp_target_child_fn_ptr (gimple gs)
 static inline void
 gimple_omp_target_set_child_fn (gimple gs, tree child_fn)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
-  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;
 }
 
 
@@ -4550,8 +4953,9 @@ gimple_omp_target_set_child_fn (gimple gs, tree child_fn)
 static inline tree
 gimple_omp_target_data_arg (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
-  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;
 }
 
 
@@ -4560,8 +4964,9 @@ gimple_omp_target_data_arg (const_gimple gs)
 static inline tree *
 gimple_omp_target_data_arg_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
-  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;
 }
 
 
@@ -4570,8 +4975,9 @@ gimple_omp_target_data_arg_ptr (gimple gs)
 static inline void
 gimple_omp_target_set_data_arg (gimple gs, tree data_arg)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
-  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;
 }
 
 
@@ -4580,8 +4986,9 @@ gimple_omp_target_set_data_arg (gimple gs, tree data_arg)
 static inline tree
 gimple_omp_teams_clauses (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TEAMS);
-  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;
 }
 
 
@@ -4590,8 +4997,9 @@ gimple_omp_teams_clauses (const_gimple gs)
 static inline tree *
 gimple_omp_teams_clauses_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TEAMS);
-  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;
 }
 
 
@@ -4600,8 +5008,9 @@ gimple_omp_teams_clauses_ptr (gimple gs)
 static inline void
 gimple_omp_teams_set_clauses (gimple gs, tree clauses)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TEAMS);
-  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;
 }
 
 
@@ -4610,8 +5019,9 @@ gimple_omp_teams_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;
 }
 
 
@@ -4620,8 +5030,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;
 }
 
 
@@ -4631,8 +5042,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;
 }
 
 
@@ -4642,8 +5054,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;
 }
 
 
@@ -4653,8 +5066,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;
 }
 
 
@@ -4664,8 +5078,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;
 }
 
 
@@ -4674,10 +5089,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;
 }
 
 
@@ -4686,9 +5102,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;
 }
 
 
@@ -4697,8 +5114,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;
 }
 
 
@@ -4707,8 +5125,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;
 }
 
 
@@ -4717,8 +5136,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;
 }
 
 
@@ -4727,8 +5147,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;
 }
 
 
@@ -4737,8 +5158,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;
 }
 
 
@@ -4747,8 +5169,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;
 }
 
 
@@ -4757,8 +5180,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;
 }
 
 
@@ -4767,8 +5191,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;
 }
 
 
@@ -4777,8 +5202,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;
 }
 
 
@@ -4787,8 +5213,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.  */
@@ -4796,8 +5223,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.  */
@@ -4805,8 +5233,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;
 }
 
 
@@ -4815,8 +5244,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;
 }
 
 
@@ -4825,8 +5255,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;
 }
 
 
@@ -4835,8 +5266,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.  */
@@ -4844,8 +5276,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.  */
@@ -4861,15 +5294,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.  */
@@ -4878,7 +5313,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.  */
@@ -4886,8 +5321,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.  */
@@ -4895,8 +5331,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.  */
@@ -4905,7 +5342,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;
 }
 
 
@@ -5015,7 +5452,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);
 }
 
 
@@ -5025,7 +5462,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;
 }
 
@@ -5036,7 +5473,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;
 }
 
 
@@ -5047,9 +5484,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;
 }
 
 
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index caecbf2..9e52d1a 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -2631,7 +2631,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 da7bf5b..417d5b5 100644
--- a/gcc/tree-phinodes.c
+++ b/gcc/tree-phinodes.c
@@ -184,7 +184,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

