summaryrefslogtreecommitdiffstats
path: root/gcc
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-09 15:58:21 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-09 15:58:21 +0000
commit9cee7c3f6fd4fa30563fa22dd62334bb06667112 (patch)
treec4ffa2ad3dad1e3ec528b5e2c71f6e4281357d6b /gcc
parent0d59b19dc2331e2fd6d3ce1d95d0d6c22263c282 (diff)
downloadppe42-gcc-9cee7c3f6fd4fa30563fa22dd62334bb06667112.tar.gz
ppe42-gcc-9cee7c3f6fd4fa30563fa22dd62334bb06667112.zip
* cgraphunit.c (cgraph_mark_functions_to_output): Renable node
dumping for development builds. * emit-rtl.c (verify_rtx_sharing): Give verbose failure for development builds only. * genattrtab.c (write_eligible_delay): Fix typo in previous commit. * tree.c (iterative_hash_expr): Replace gcc_unreachable with gcc_assert. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87241 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/cgraphunit.c18
-rw-r--r--gcc/emit-rtl.c13
-rw-r--r--gcc/genattrtab.c2
-rw-r--r--gcc/tree.c6
5 files changed, 39 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 652fbfb92f3..b1ec6262758 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,16 @@
2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
+ * cgraphunit.c (cgraph_mark_functions_to_output): Renable node
+ dumping for development builds.
+ * emit-rtl.c (verify_rtx_sharing): Give verbose failure for
+ development builds only.
+ * genattrtab.c (write_eligible_delay): Fix typo in previous
+ commit.
+ * tree.c (iterative_hash_expr): Replace gcc_unreachable with
+ gcc_assert.
+
+2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
+
* gcse.c (INSN_CUID, insert_set_in_table, find_avail_set,
cprop_insn, do_local_cprop, local_cprop_pass, find_bypass_set,
process_insert_insn, insert_insn_end_bb, pre_insert_copy_insn,
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 81df3099513..d0048a83731 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -776,9 +776,21 @@ cgraph_mark_functions_to_output (void)
&& !DECL_EXTERNAL (decl))
node->output = 1;
else
- /* We should've reclaimed all functions that are not needed. */
- gcc_assert (node->global.inlined_to || !DECL_SAVED_TREE (decl)
- || DECL_EXTERNAL (decl));
+ {
+ /* We should've reclaimed all functions that are not needed. */
+#ifdef ENABLE_CHECKING
+ if (!node->global.inlined_to && DECL_SAVED_TREE (decl)
+ && !DECL_EXTERNAL (decl))
+ {
+ dump_cgraph_node (stderr, node);
+ internal_error ("failed to reclaim unneeded function");
+ }
+#endif
+ gcc_assert (node->global.inlined_to || !DECL_SAVED_TREE (decl)
+ || DECL_EXTERNAL (decl));
+
+ }
+
}
}
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 9f9289bfad5..ab721fe8aa7 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -2260,15 +2260,18 @@ verify_rtx_sharing (rtx orig, rtx insn)
/* This rtx may not be shared. If it has already been seen,
replace it with a copy of itself. */
-
+#ifdef ENABLE_CHECKING
if (RTX_FLAG (x, used))
{
error ("Invalid rtl sharing found in the insn");
debug_rtx (insn);
error ("Shared rtx");
debug_rtx (x);
- fatal_error ("Internal consistency failure");
+ internal_error ("Internal consistency failure");
}
+#endif
+ gcc_assert (!RTX_FLAG (x, used));
+
RTX_FLAG (x, used) = 1;
/* Now scan the subexpressions recursively. */
@@ -2291,9 +2294,11 @@ verify_rtx_sharing (rtx orig, rtx insn)
for (j = 0; j < len; j++)
{
- /* We allow sharing of ASM_OPERANDS inside single instruction. */
+ /* We allow sharing of ASM_OPERANDS inside single
+ instruction. */
if (j && GET_CODE (XVECEXP (x, i, j)) == SET
- && GET_CODE (SET_SRC (XVECEXP (x, i, j))) == ASM_OPERANDS)
+ && (GET_CODE (SET_SRC (XVECEXP (x, i, j)))
+ == ASM_OPERANDS))
verify_rtx_sharing (SET_DEST (XVECEXP (x, i, j)), insn);
else
verify_rtx_sharing (XVECEXP (x, i, j), insn);
diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c
index f3385caa7dc..dc8ff6ebcb3 100644
--- a/gcc/genattrtab.c
+++ b/gcc/genattrtab.c
@@ -4125,7 +4125,7 @@ write_eligible_delay (const char *kind)
printf ("{\n");
printf (" rtx insn;\n");
printf ("\n");
- printf (" gcc_assert (slot < %d)\n", max_slots);
+ printf (" gcc_assert (slot < %d);\n", max_slots);
printf ("\n");
/* Allow dbr_schedule to pass labels, etc. This can happen if try_split
converts a compound instruction into a loop. */
diff --git a/gcc/tree.c b/gcc/tree.c
index 7b9c53f31a7..c7031e16cbe 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -4044,8 +4044,10 @@ iterative_hash_expr (tree t, hashval_t val)
/* Decls we can just compare by pointer. */
val = iterative_hash_pointer (t, val);
}
- else if (IS_EXPR_CODE_CLASS (class))
+ else
{
+ gcc_assert (IS_EXPR_CODE_CLASS (class));
+
val = iterative_hash_object (code, val);
/* Don't hash the type, that can lead to having nodes which
@@ -4080,8 +4082,6 @@ iterative_hash_expr (tree t, hashval_t val)
for (i = first_rtl_op (code) - 1; i >= 0; --i)
val = iterative_hash_expr (TREE_OPERAND (t, i), val);
}
- else
- gcc_unreachable ();
return val;
break;
}
OpenPOWER on IntegriCloud