* ipa-type-escape.c (analyze_variable): Use gcc_assert instead of
authorreichelt <reichelt@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Dec 2005 15:46:09 +0000 (15:46 +0000)
committerreichelt <reichelt@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Dec 2005 15:46:09 +0000 (15:46 +0000)
abort.
* except.c (output_ttype): Likewise.
* tree-object-size.c (collect_object_sizes_for): Likewise.
(check_for_plus_in_loops_1): Likewise.
(check_for_plus_in_loops): Likewise.
(compute_object_sizes): Use gcc_unreachable instead of abort.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108237 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/except.c
gcc/ipa-type-escape.c
gcc/tree-object-size.c

index 90e9b84..7a8b1b7 100644 (file)
@@ -1,3 +1,14 @@
+2005-12-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+            Christophe Jaillet  <christophe.jaillet@wanadoo.fr>
+
+       * ipa-type-escape.c (analyze_variable): Use gcc_assert instead of
+       abort.
+       * except.c (output_ttype): Likewise.
+       * tree-object-size.c (collect_object_sizes_for): Likewise.
+       (check_for_plus_in_loops_1): Likewise.
+       (check_for_plus_in_loops): Likewise.
+       (compute_object_sizes): Use gcc_unreachable instead of abort.
+
 2005-12-08  Nathan Sidwell  <nathan@codesourcery.com>
 
        * config/ms1/ms1.md (UNSPEC_LOOP): New constant.
index 0ace54d..782a516 100644 (file)
@@ -3486,8 +3486,8 @@ output_ttype (tree type, int tt_format, int tt_format_size)
              public = TREE_PUBLIC (type);
            }
        }
-      else if (TREE_CODE (type) != INTEGER_CST)
-       abort ();
+      else
+       gcc_assert (TREE_CODE (type) == INTEGER_CST);
     }
 
   /* Allow the target to override the type table entry format.  */
index a06bb1d..af0c2a4 100644 (file)
@@ -1349,13 +1349,10 @@ analyze_variable (struct cgraph_varpool_node *vnode)
   if (vnode->externally_visible)
     mark_interesting_type (type, FULL_ESCAPE);
 
-  if (TREE_CODE (global) == VAR_DECL)
-    {
-      if (DECL_INITIAL (global)) 
-       walk_tree (&DECL_INITIAL (global), scan_for_refs, 
-                  NULL, visited_nodes);
-    } 
-  else abort();
+  gcc_assert (TREE_CODE (global) == VAR_DECL);
+
+  if (DECL_INITIAL (global))
+    walk_tree (&DECL_INITIAL (global), scan_for_refs, NULL, visited_nodes);
 }
 
 /* This is the main routine for finding the reference patterns for
index 178dc98..01eb381 100644 (file)
@@ -688,8 +688,7 @@ collect_object_sizes_for (struct object_size_info *osi, tree var)
   switch (TREE_CODE (stmt))
     {
     case RETURN_EXPR:
-      if (TREE_CODE (TREE_OPERAND (stmt, 0)) != MODIFY_EXPR)
-       abort ();
+      gcc_assert (TREE_CODE (TREE_OPERAND (stmt, 0)) == MODIFY_EXPR);
       stmt = TREE_OPERAND (stmt, 0);
       /* FALLTHRU  */
 
@@ -815,8 +814,7 @@ check_for_plus_in_loops_1 (struct object_size_info *osi, tree var,
   switch (TREE_CODE (stmt))
     {
     case RETURN_EXPR:
-      if (TREE_CODE (TREE_OPERAND (stmt, 0)) != MODIFY_EXPR)
-       abort ();
+      gcc_assert (TREE_CODE (TREE_OPERAND (stmt, 0)) == MODIFY_EXPR);
       stmt = TREE_OPERAND (stmt, 0);
       /* FALLTHRU  */
 
@@ -894,8 +892,7 @@ check_for_plus_in_loops (struct object_size_info *osi, tree var)
   switch (TREE_CODE (stmt))
     {
     case RETURN_EXPR:
-      if (TREE_CODE (TREE_OPERAND (stmt, 0)) != MODIFY_EXPR)
-       abort ();
+      gcc_assert (TREE_CODE (TREE_OPERAND (stmt, 0)) == MODIFY_EXPR);
       stmt = TREE_OPERAND (stmt, 0);
       /* FALLTHRU  */
 
@@ -1045,7 +1042,7 @@ compute_object_sizes (void)
            }
 
          if (!set_rhs (stmtp, result))
-           abort ();
+           gcc_unreachable ();
          update_stmt (*stmtp);
 
          if (dump_file && (dump_flags & TDF_DETAILS))