aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorVolker Reichelt <reichelt@igpm.rwth-aachen.de>2005-12-08 15:46:09 +0000
committerVolker Reichelt <reichelt@gcc.gnu.org>2005-12-08 15:46:09 +0000
commitdd2c9f746201cd614e594d05ce52f832626c66ab (patch)
treee1639906e1c1e7741a5d5186f82d45bc10d23605 /gcc
parentccd83be5d60adc34ce892a4650dda435ea3cd60e (diff)
downloadgcc-dd2c9f746201cd614e594d05ce52f832626c66ab.zip
gcc-dd2c9f746201cd614e594d05ce52f832626c66ab.tar.gz
gcc-dd2c9f746201cd614e594d05ce52f832626c66ab.tar.bz2
ipa-type-escape.c (analyze_variable): Use gcc_assert instead of abort.
* 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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/except.c4
-rw-r--r--gcc/ipa-type-escape.c11
-rw-r--r--gcc/tree-object-size.c11
4 files changed, 21 insertions, 16 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 90e9b84..7a8b1b7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/except.c b/gcc/except.c
index 0ace54d..782a516 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -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. */
diff --git a/gcc/ipa-type-escape.c b/gcc/ipa-type-escape.c
index a06bb1d..af0c2a4 100644
--- a/gcc/ipa-type-escape.c
+++ b/gcc/ipa-type-escape.c
@@ -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
diff --git a/gcc/tree-object-size.c b/gcc/tree-object-size.c
index 178dc98..01eb381 100644
--- a/gcc/tree-object-size.c
+++ b/gcc/tree-object-size.c
@@ -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))