ipa-type-escape.c (analyze_variable): Use gcc_assert instead of abort.
authorVolker Reichelt <reichelt@igpm.rwth-aachen.de>
Thu, 8 Dec 2005 15:46:09 +0000 (15:46 +0000)
committerVolker Reichelt <reichelt@gcc.gnu.org>
Thu, 8 Dec 2005 15:46:09 +0000 (15:46 +0000)
* 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.

Co-Authored-By: Christophe Jaillet <christophe.jaillet@wanadoo.fr>
From-SVN: r108237

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

index 90e9b84a61559f9a18f55389d55c4c8150afb478..7a8b1b7b534553a7194e60e78d5830b8fca0db3f 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 0ace54d872e79380f0dc46bb589cb5f541861e11..782a516abfb64ce4a24a82da136407c60bf5d98f 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 a06bb1d4040a2c9d626bacf106c3fb7ffd98f48f..af0c2a405ba3c6563280d6108c8c532c80065582 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 178dc98d6278805e7b0daa566fedff581f229378..01eb3814b27915f970e5272fb3e4bd5bed65894a 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))