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


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

[tuples] Convert type checking code to use tuples


This patch from Chris converts the type checking code to use tuples.
This required a few changes in the checking of GIMPLE_ASSIGN.  Since
the RHS is not an expression tree anymore, the checker needs to
explicitly check types of each operand against what it's expected from
the actual operation code (whereas before, checking TREE_TYPE (rhs)
was sufficient).

This gives us better control over the check, but it also means that we
have to check several special cases.

The verifier found two problems in the gimplifier that I'm fixing in a
subsequent patch.
2007-08-30  Chris Matthews  <chrismatthews@google.com>
	    Diego Novillo  <dnovillo@google.com>

	* gimplify.c (gimplify_body): Call verify_gimple_seq if
	ENABLE_TYPES_CHECKING is set.
	* gimple.h (is_gimple_omp): New.
	* tree-cfg.c (verify_gimple_tree_expr): Rename from
	verify_gimple_expr.
	Verify tree nodes that should disappear after conversion to
	GIMPLE.
	Do not handle COND_EXPR, CALL_EXPR.
	(verify_gimple_modify_stmt): Remove.
	(verify_gimple_call): New.
	(verify_gimple_cond): New.
	(verify_gimple_assign): New.
	(verify_gimple_return): New.
	(verify_gimple_switch): New.
	(verify_gimple_stmt):  Change input argument to type gimple.
	Call new verifiers.
	(verify_gimple_seq): Rename from verify_gimple_1.

Index: gimplify.c
===================================================================
--- gimplify.c	(revision 127911)
+++ gimplify.c	(working copy)
@@ -6665,12 +6678,9 @@ gimplify_body (tree *body_p, tree fndecl
   pop_gimplify_context (outer_bind);
   gcc_assert (gimplify_ctxp == NULL);
 
-  /* FIXME tuples: We need a version of this for tuples.  */
-#if 0
 #ifdef ENABLE_TYPES_CHECKING
   if (!errorcount && !sorrycount)
-    verify_gimple_1 (BIND_EXPR_BODY (*body_p));
-#endif
+    verify_gimple_seq (gimple_bind_body (outer_bind));
 #endif
 
   timevar_pop (TV_TREE_GIMPLIFY);
Index: gimple.h
===================================================================
--- gimple.h	(revision 127911)
+++ gimple.h	(working copy)
@@ -1651,9 +1675,27 @@ gimple_return_set_retval (gimple gs, tre
 }
 
 
+/* Returns true when the gimple statment STMT is any of the OpenMP types.  */
+
+static inline bool
+is_gimple_omp (gimple stmt)
+{
+  return (gimple_code (stmt) == GIMPLE_OMP_PARALLEL
+	  || gimple_code (stmt) == GIMPLE_OMP_FOR
+	  || gimple_code (stmt) == GIMPLE_OMP_SECTIONS
+	  || gimple_code (stmt) == GIMPLE_OMP_SINGLE
+	  || gimple_code (stmt) == GIMPLE_OMP_SECTION
+	  || gimple_code (stmt) == GIMPLE_OMP_MASTER
+	  || gimple_code (stmt) == GIMPLE_OMP_ORDERED
+	  || gimple_code (stmt) == GIMPLE_OMP_CRITICAL
+	  || gimple_code (stmt) == GIMPLE_OMP_RETURN
+	  || gimple_code (stmt) == GIMPLE_OMP_CONTINUE);
+}
+
+
 /* GIMPLE_NOP.  */
 
Index: tree-cfg.c
===================================================================
--- tree-cfg.c	(revision 127911)
+++ tree-cfg.c	(working copy)
@@ -3534,21 +3672,54 @@ verify_gimple_reference (tree expr)
   return verify_gimple_min_lval (expr);
 }
 
-/* Verify the GIMPLE expression EXPR.  Returns true if there is an
+
+/* Verify the gimplified tree expression EXPR.  Returns true if there is an
    error, otherwise false.  */
 
 static bool
-verify_gimple_expr (tree expr)
+verify_gimple_tree_expr (tree expr)
 {
   tree type = TREE_TYPE (expr);
 
   if (is_gimple_val (expr))
     return false;
-
+  
   /* Special codes we cannot handle via their class.  */
   switch (TREE_CODE (expr))
     {
+    /* Verify the things we can have.  */
+    case VAR_DECL:
+    case LABEL_DECL:
+    case CASE_LABEL_EXPR:
+    case FUNCTION_DECL:
+    case TYPE_DECL:
+    case PARM_DECL:
+    case RESULT_DECL:
+    case WITH_SIZE_EXPR:
     case NOP_EXPR:
+      return false;
+      
+    /*  After gimplification we should not have any of these.  */
+    case ASM_EXPR:
+    case BIND_EXPR:
+    case CALL_EXPR:
+    case COND_EXPR:
+    case TREE_LIST:
+    case COMPOUND_EXPR:
+    case MODIFY_EXPR:
+    case GIMPLE_MODIFY_STMT:
+    case INIT_EXPR:
+    case GOTO_EXPR:
+    case LABEL_EXPR:
+    case RETURN_EXPR:
+    case TRY_FINALLY_EXPR:
+    case TRY_CATCH_EXPR:
+    case EH_FILTER_EXPR:
+    case STATEMENT_LIST:
+      {
+        error ("tree node that should already be gimple.");
+        return true;
+      }
     case CONVERT_EXPR:
       {
 	tree op = TREE_OPERAND (expr, 0);
@@ -3731,35 +3902,6 @@ verify_gimple_expr (tree expr)
 	return false;
       }
 
-    case COND_EXPR:
-      {
-	tree op0 = TREE_OPERAND (expr, 0);
-	tree op1 = TREE_OPERAND (expr, 1);
-	tree op2 = TREE_OPERAND (expr, 2);
-	if ((!is_gimple_val (op1)
-	     && TREE_CODE (TREE_TYPE (op1)) != VOID_TYPE)
-	    || (!is_gimple_val (op2)
-		&& TREE_CODE (TREE_TYPE (op2)) != VOID_TYPE))
-	  {
-	    error ("invalid operands in conditional expression");
-	    return true;
-	  }
-	if (!INTEGRAL_TYPE_P (TREE_TYPE (op0))
-	    || (TREE_CODE (TREE_TYPE (op1)) != VOID_TYPE
-	        && !useless_type_conversion_p (type, TREE_TYPE (op1)))
-	    || (TREE_CODE (TREE_TYPE (op2)) != VOID_TYPE
-	        && !useless_type_conversion_p (type, TREE_TYPE (op2))))
-	  {
-	    error ("type mismatch in conditional expression");
-	    debug_generic_stmt (type);
-	    debug_generic_stmt (TREE_TYPE (op0));
-	    debug_generic_stmt (TREE_TYPE (op1));
-	    debug_generic_stmt (TREE_TYPE (op2));
-	    return true;
-	  }
-	return verify_gimple_expr (op0);
-      }
-
     case ADDR_EXPR:
       {
 	tree op = TREE_OPERAND (expr, 0);
@@ -3839,17 +3981,15 @@ verify_gimple_expr (tree expr)
 	return false;
       }
 
-    case CALL_EXPR:
-      /* FIXME.  The C frontend passes unpromoted arguments in case it
-	 didn't see a function declaration before the call.  */
-      return false;
-
     default:;
     }
 
   /* Generic handling via classes.  */
   switch (TREE_CODE_CLASS (TREE_CODE (expr)))
     {
+    case tcc_type:
+      return false;
+
     case tcc_unary:
       return verify_gimple_unary_expr (expr);
 
@@ -3898,173 +4038,385 @@ verify_gimple_expr (tree expr)
   return false;
 }
 
-/* Verify the GIMPLE assignment statement STMT.  Returns true if there
-   is an error, otherwise false.  */
+/* Verify the contents of a GIMPLE_CALL STMT.  Returns true when there
+   is a problem, otherwise false.  */
 
 static bool
-verify_gimple_modify_stmt (const_tree stmt)
+verify_gimple_call (gimple stmt)
 {
-  tree lhs = GIMPLE_STMT_OPERAND (stmt, 0);
-  tree rhs = GIMPLE_STMT_OPERAND (stmt, 1);
+  bool failed = false;
+  unsigned int i;
 
-  gcc_assert (TREE_CODE (stmt) == GIMPLE_MODIFY_STMT);
+  if (gimple_call_lhs (stmt))
+    failed |= verify_gimple_tree_expr (gimple_call_lhs (stmt));
 
-  if (!useless_type_conversion_p (TREE_TYPE (lhs),
-				  TREE_TYPE (rhs)))
-    {
-      error ("non-trivial conversion at assignment");
-      debug_generic_expr (TREE_TYPE (lhs));
-      debug_generic_expr (TREE_TYPE (rhs));
-      return true;
-    }
+  failed |= verify_gimple_tree_expr (gimple_call_fn (stmt));
+  failed |= verify_gimple_tree_expr (gimple_call_return_type (stmt));
 
-  /* Loads/stores from/to a variable are ok.  */
-  if ((is_gimple_val (lhs)
-       && is_gimple_variable (rhs))
-      || (is_gimple_val (rhs)
-	  && is_gimple_variable (lhs)))
-    return false;
+  if (gimple_call_chain (stmt))
+    failed |= verify_gimple_tree_expr (gimple_call_chain (stmt));
 
-  /* Aggregate copies are ok.  */
-  if (!is_gimple_reg_type (TREE_TYPE (lhs))
-      && !is_gimple_reg_type (TREE_TYPE (rhs)))
-    return false;
+  for (i = 0; i < gimple_call_nargs (stmt); i++)
+    failed |= verify_gimple_tree_expr (gimple_call_arg (stmt,i));
 
-  /* We might get 'loads' from a parameter which is not a gimple value.  */
-  if (TREE_CODE (rhs) == PARM_DECL)
-    return verify_gimple_expr (lhs);
+  return failed;
+}
 
-  if (!is_gimple_variable (lhs)
-      && verify_gimple_expr (lhs))
-    return true;
 
-  if (!is_gimple_variable (rhs)
-      && verify_gimple_expr (rhs))
-    return true;
+/* Verify the contents of a GIMPLE_COND STMT.  Returns true when there
+   is a problem, otherwise false.  */
 
-  return false;
+static bool
+verify_gimple_cond (gimple stmt)
+{
+  bool failed = false;
+  
+  failed |= verify_gimple_tree_expr (gimple_cond_lhs (stmt));
+  failed |= verify_gimple_tree_expr (gimple_cond_rhs (stmt));
+  failed |= verify_gimple_tree_expr (gimple_cond_true_label (stmt));
+  failed |= verify_gimple_tree_expr (gimple_cond_false_label (stmt));
+
+  return failed;
 }
 
-/* Verify the GIMPLE statement STMT.  Returns true if there is an
-   error, otherwise false.  */
+
+/* Verify the contents of a GIMPLE_ASSIGN STMT.  Returns true when there
+   is a problem, otherwise false.  */
 
 static bool
-verify_gimple_stmt (tree stmt)
+verify_gimple_assign (gimple stmt)
 {
-  if (!is_gimple_stmt (stmt))
-    {
-      error ("is not a valid GIMPLE statement");
-      return true;
-    }
+  enum tree_code rhs_code = gimple_assign_rhs_code (stmt);
+  tree lhs = gimple_assign_lhs (stmt);
+  tree rhs1 = gimple_assign_rhs1 (stmt);
+  tree rhs2 = (gimple_num_ops (stmt) == 3) ? gimple_assign_rhs2 (stmt) : NULL;
 
-  if (OMP_DIRECTIVE_P (stmt))
+  /* Verify that the types of the LHS and the RHS operands are 
+     compatible.  This verification largely depends on what kind of
+     operation is done on the RHS of the assignment.  It is not always
+     the case that all the types of the operands must match (e.g.,
+     'a = (unsigned long) b' or 'ptr = ptr + 1').  */
+  if (rhs_code == NOP_EXPR
+      || rhs_code == CONVERT_EXPR
+      || rhs_code == FLOAT_EXPR
+      || rhs_code == FIX_TRUNC_EXPR
+      || rhs_code == FIXED_CONVERT_EXPR)
     {
-      /* OpenMP directives are validated by the FE and never operated
-	 on by the optimizers.  Furthermore, OMP_FOR may contain
-	 non-gimple expressions when the main index variable has had
-	 its address taken.  This does not affect the loop itself
-	 because the header of an OMP_FOR is merely used to determine
-	 how to setup the parallel iteration.  */
+      /* Type casts are OK.  */
       return false;
     }
+  else if (TREE_CODE_CLASS (rhs_code) == tcc_comparison)
+    {
+      /* For comparisons, check that the two operands on the RHS are
+	 of compatible types and that the LHS is an integral type.  */
+      if (!useless_type_conversion_p (TREE_TYPE (rhs1), TREE_TYPE (rhs2)))
+	{
+	  if (POINTER_TYPE_P (TREE_TYPE (rhs1))
+	      && POINTER_TYPE_P (TREE_TYPE (rhs2)))
+	    {
+	      /* Comparing pointers is always fine.  FIXME, really?  */
+	      ;
+	    }
+	  else
+	    {
+	      error ("incompatible types in comparison");
+	      debug_generic_expr (TREE_TYPE (rhs1));
+	      debug_generic_expr (TREE_TYPE (rhs2));
+	      return true;
+	    }
+	}
 
-  switch (TREE_CODE (stmt))
+      if (!INTEGRAL_TYPE_P (TREE_TYPE (lhs)))
+	{
+	  error ("assignment of a conditional expression to a non-integral");
+	  debug_generic_expr (TREE_TYPE (lhs));
+	  return true;
+	}
+    }
+  else if (rhs_code == TRUTH_ANDIF_EXPR
+           || rhs_code == TRUTH_ORIF_EXPR
+	   || rhs_code == TRUTH_AND_EXPR
+	   || rhs_code == TRUTH_OR_EXPR
+	   || rhs_code == TRUTH_XOR_EXPR
+	   || rhs_code == TRUTH_NOT_EXPR)
     {
-    case GIMPLE_MODIFY_STMT:
-      return verify_gimple_modify_stmt (stmt);
+      /* The types just have to be integral types.  */
+      if (!INTEGRAL_TYPE_P (TREE_TYPE (lhs))
+	  || !INTEGRAL_TYPE_P (TREE_TYPE (rhs1))
+	  || (rhs2 && !INTEGRAL_TYPE_P (TREE_TYPE (rhs2))))
+	{
+	  error ("boolean expression using non-integral operands");
+	  return true;
+	}
+    }
+  else if (rhs_code == ADDR_EXPR)
+    {
+      if (!POINTER_TYPE_P (TREE_TYPE (lhs)))
+	{
+	  error ("address assignment to a non-pointer variable");
+	  return true;
+	}
 
-    case GOTO_EXPR:
-    case LABEL_EXPR:
       return false;
+    }
+  else if (rhs_code == POINTER_PLUS_EXPR)
+    {
+      /* The LHS should be a pointer type and the RHS should be of the
+	 form ptr + integral.  */
+      if (!POINTER_TYPE_P (TREE_TYPE (lhs)))
+	{
+	  error ("non-pointer type in a POINTER_PLUS_EXPR");
+	  debug_generic_expr (TREE_TYPE (lhs));
+	  return true;
+	}
 
-    case SWITCH_EXPR:
-      if (!is_gimple_val (TREE_OPERAND (stmt, 0)))
+      if (!POINTER_TYPE_P (TREE_TYPE (rhs1)))
 	{
-	  error ("invalid operand to switch statement");
-	  debug_generic_expr (TREE_OPERAND (stmt, 0));
+	  error ("non-pointer type in a POINTER_PLUS_EXPR");
+	  debug_generic_expr (TREE_TYPE (rhs1));
+	  return true;
 	}
-      return false;
 
-    case RETURN_EXPR:
-      {
-	tree op = TREE_OPERAND (stmt, 0);
+      if (!INTEGRAL_TYPE_P (TREE_TYPE (rhs2)))
+	{
+	  error ("non-integral addition in a POINTER_PLUS_EXPR");
+	  debug_generic_expr (TREE_TYPE (rhs2));
+	  return true;
+	}
+    }
+  else if (rhs_code == LSHIFT_EXPR
+	   || rhs_code == RSHIFT_EXPR
+	   || rhs_code == LROTATE_EXPR
+	   || rhs_code == RROTATE_EXPR
+	   || rhs_code == BIT_IOR_EXPR
+	   || rhs_code == BIT_XOR_EXPR
+	   || rhs_code == BIT_AND_EXPR
+	   || rhs_code == BIT_NOT_EXPR)
+    {
+      /* Bitwise operators must operate on integral types, but they
+	 are not required to be the same.  */
+      if (!INTEGRAL_TYPE_P (TREE_TYPE (lhs))
+	  || !INTEGRAL_TYPE_P (TREE_TYPE (rhs1))
+	  || (rhs2 && !INTEGRAL_TYPE_P (TREE_TYPE (rhs2))))
+	{
+	  error ("bitwise operation on non-integral type");
+	  return true;
+	}
+    }
+  else if (rhs_code == COMPLEX_EXPR)
+    {
+      /* The LHS must be of complex type and the two RHS operands must
+	 be of compatible types.  */
+      if (TREE_CODE (TREE_TYPE (lhs)) != COMPLEX_TYPE)
+	{
+	  error ("assignment of COMPLEX_EXPR to non-complex");
+	  debug_generic_expr (TREE_TYPE (lhs));
+	  return true;
+	}
 
-	if (TREE_CODE (TREE_TYPE (stmt)) != VOID_TYPE)
+      if (!useless_type_conversion_p (TREE_TYPE (rhs1), TREE_TYPE (rhs2)))
+	{
+	  error ("type mismatch in COMPLEX_EXPR operands");
+	  debug_generic_expr (TREE_TYPE (rhs1));
+	  debug_generic_expr (TREE_TYPE (rhs2));
+	  return true;
+	}
+    }
+  else
+    {
+      /* For any other assignment, the LHS and RHS must have
+	 compatible types.  */
+      size_t i;
+      tree type = TREE_TYPE (lhs);
+      for (i = 1; i < gimple_num_ops (stmt); i++)
+	if (!useless_type_conversion_p (type, TREE_TYPE (gimple_op (stmt, i))))
 	  {
-	    error ("type error in return expression");
+	    error ("non-trivial conversion at assignment");
+	    debug_generic_expr (TREE_TYPE (lhs));
+	    debug_generic_expr (TREE_TYPE (gimple_op (stmt, i)));
 	    return true;
 	  }
+    }
 
-	if (op == NULL_TREE
-	    || TREE_CODE (op) == RESULT_DECL)
-	  return false;
+  if (gimple_assign_copy_p (stmt))
+    {
+      tree rhs = rhs1;
 
-	return verify_gimple_modify_stmt (op);
-      }
+      /* Loads/stores from/to a variable are ok.  */
+      if ((is_gimple_val (lhs)
+	    && is_gimple_variable (rhs))
+	  || (is_gimple_val (rhs)
+	    && is_gimple_variable (lhs)))
+	return false;
 
-    case CALL_EXPR:
-    case COND_EXPR:
-      return verify_gimple_expr (stmt);
+      /* Aggregate copies are ok.  */
+      if (!is_gimple_reg_type (TREE_TYPE (lhs))
+	  && !is_gimple_reg_type (TREE_TYPE (rhs)))
+	return false;
 
-    case NOP_EXPR:
-    case CHANGE_DYNAMIC_TYPE_EXPR:
-    case ASM_EXPR:
-      return false;
+      /* We might get 'loads' from a parameter which is not a gimple value.  */
+      if (TREE_CODE (rhs) == PARM_DECL)
+	return verify_gimple_tree_expr (lhs);
 
-    default:
-      gcc_unreachable ();
+      if (!is_gimple_variable (lhs)
+	  && verify_gimple_tree_expr (lhs))
+	return true;
+
+      if (!is_gimple_variable (rhs)
+	  && verify_gimple_tree_expr (rhs))
+	return true;
     }
+
+  return false;
 }
 
-/* Verify the GIMPLE statements inside the statement list STMTS.  */
 
-void
-verify_gimple_1 (tree stmts)
+/* Verify the contents of a GIMPLE_RETURN STMT.  Returns true when there
+   is a problem, otherwise false.  */
+
+static bool
+verify_gimple_return (gimple stmt)
 {
-  tree_stmt_iterator tsi;
+  tree op = gimple_return_retval (stmt);
 
-  for (tsi = tsi_start (stmts); !tsi_end_p (tsi); tsi_next (&tsi))
+  if (op == NULL || TREE_CODE (op) == RESULT_DECL)
+    return false;
+  
+  return verify_gimple_tree_expr (op);
+}
+
+
+/* Verify the contents of a GIMPLE_SWITCH STMT.  Returns true when there
+   is a problem, otherwise false.  */
+
+static bool
+verify_gimple_switch (gimple stmt)
+{
+  if (!is_gimple_val (gimple_switch_index (stmt)))
     {
-      tree stmt = tsi_stmt (tsi);
+      error ("invalid operand to switch statement");
+      debug_generic_expr (gimple_switch_index (stmt));
+    }
+  return false;
+}
 
-      switch (TREE_CODE (stmt))
-	{
-	case BIND_EXPR:
-	  verify_gimple_1 (BIND_EXPR_BODY (stmt));
-	  break;
+  /* Verify the GIMPLE statement STMT.  Returns true if there is an
+   error, otherwise false.  */
 
-	case TRY_CATCH_EXPR:
-	case TRY_FINALLY_EXPR:
-	  verify_gimple_1 (TREE_OPERAND (stmt, 0));
-	  verify_gimple_1 (TREE_OPERAND (stmt, 1));
-	  break;
+static bool
+verify_gimple_stmt (gimple stmt)
+{
 
-	case CATCH_EXPR:
-	  verify_gimple_1 (CATCH_BODY (stmt));
-	  break;
+  if (is_gimple_omp (stmt))
+    {
+      /* OpenMP directives are validated by the FE and never operated
+	 on by the optimizers.  Furthermore, OMP_FOR may contain
+	 non-gimple expressions when the main index variable has had
+	 its address taken.  This does not affect the loop itself
+	 because the header of an OMP_FOR is merely used to determine
+	 how to setup the parallel iteration.  */
+      return false;
+    }
 
-	case EH_FILTER_EXPR:
-	  verify_gimple_1 (EH_FILTER_FAILURE (stmt));
-	  break;
+  switch (gimple_code (stmt))
+    {
+    /* we plan to remove these - so no point checking them.  */
+    case GIMPLE_MODIFY_STMT:
+      return true; 
 
-	default:
-	  if (verify_gimple_stmt (stmt))
-	    debug_generic_expr (stmt);
-	}
+    case GIMPLE_GOTO:
+      return verify_gimple_tree_expr (gimple_goto_dest (stmt));
+    case GIMPLE_LABEL:
+      return verify_gimple_tree_expr (gimple_label_label (stmt));
+    case GIMPLE_NOP:
+      return false;
+    case GIMPLE_SWITCH:
+      return verify_gimple_switch (stmt);
+    case GIMPLE_RETURN:
+      return verify_gimple_return (stmt);
+    case GIMPLE_CALL:
+      return verify_gimple_call (stmt);
+    case GIMPLE_COND:
+      return verify_gimple_cond (stmt);
+    case GIMPLE_ASM:
+      return gimple_asm_string (stmt) == NULL;
+    case GIMPLE_ASSIGN:
+      return verify_gimple_assign (stmt);
+    case GIMPLE_PHI:
+      return verify_gimple_tree_expr (gimple_phi_result (stmt));
+    default:
+      gcc_unreachable ();
     }
 }
 
-/* Verify the GIMPLE statements inside the current function.  */
+
+/* Verify the GIMPLE statements inside the sequence STMTS.  */
 
 void
-verify_gimple (void)
+verify_gimple_seq (gimple_seq stmts)
 {
-  verify_gimple_1 (BIND_EXPR_BODY (DECL_SAVED_TREE (cfun->decl)));
+  gimple_stmt_iterator* ittr;
+
+  for (ittr = gsi_start (stmts); !gsi_end_p (ittr); gsi_next (ittr))
+    {
+      gimple stmt = gsi_stmt (ittr);
+
+      switch (gimple_code (stmt))
+        {
+          case GIMPLE_BIND:
+            if (gimple_bind_vars (stmt))
+              if (verify_gimple_tree_expr (gimple_bind_vars (stmt)))
+                error ("could not verify bind expr's variables.");
+            verify_gimple_seq (gimple_bind_body (stmt));
+            break;
+
+          case GIMPLE_TRY:
+            verify_gimple_seq (gimple_try_eval (stmt));
+            verify_gimple_seq (gimple_try_cleanup (stmt));
+            break;
+
+          case EH_FILTER_EXPR:
+            verify_gimple_seq (gimple_eh_filter_failure (stmt));
+            break;
+
+          case GIMPLE_CATCH:
+             verify_gimple_seq (gimple_catch_handler (stmt));
+             break;
+
+          case GIMPLE_OMP_CRITICAL:
+          case GIMPLE_OMP_CONTINUE:
+          case GIMPLE_OMP_MASTER:
+          case GIMPLE_OMP_ORDERED:
+          case GIMPLE_OMP_SECTION:
+          case GIMPLE_OMP_FOR:
+          case GIMPLE_OMP_PARALLEL:
+          case GIMPLE_OMP_SECTIONS:
+          case GIMPLE_OMP_SINGLE:
+            break;
+          /* Tuples that do not have trees.  */
+          case GIMPLE_NOP:
+          case GIMPLE_RESX:
+          case GIMPLE_OMP_RETURN:
+            break;
+
+          default:
+            if (verify_gimple_stmt (stmt))
+	      {
+		error ("verifier found an invalid statement.");
+		debug_gimple_stmt (stmt);
+		gcc_unreachable ();
+	      }
+        }
+      
+    }
 }
 

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