aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2008-09-11 14:38:57 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2008-09-11 12:38:57 +0000
commitb1d0a338a77399b28670e657bfb1085a2b879384 (patch)
treed232eb0c4901afadee306cebe1d8b162ed6cd6cf
parent9e504cda3428a725abe91cd51527a1e31608ab8d (diff)
downloadgcc-b1d0a338a77399b28670e657bfb1085a2b879384.zip
gcc-b1d0a338a77399b28670e657bfb1085a2b879384.tar.gz
gcc-b1d0a338a77399b28670e657bfb1085a2b879384.tar.bz2
re PR middle-end/37448 (cannot compile big function)
PR middle-end/37448 * cgraph.c (cgraph_create_edge): Use !cgraph_edge for sanity check. From-SVN: r140284
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/cgraph.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d7a06fb..a0d08c5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2008-09-11 Jan Hubicka <jh@suse.cz>
+ PR middle-end/37448
+ * cgraph.c (cgraph_create_edge): Use !cgraph_edge for sanity check.
+
+2008-09-11 Jan Hubicka <jh@suse.cz>
+
* tree-ssa-pre.c (phi_translate_1): Fix memory leak
2008-09-11 Jan Hubicka <jh@suse.cz>
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index a12ed15..03e5e79 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -636,11 +636,11 @@ cgraph_create_edge (struct cgraph_node *caller, struct cgraph_node *callee,
gimple call_stmt, gcov_type count, int freq, int nest)
{
struct cgraph_edge *edge = GGC_NEW (struct cgraph_edge);
-#ifdef ENABLE_CHECKING
- struct cgraph_edge *e;
- for (e = caller->callees; e; e = e->next_callee)
- gcc_assert (e->call_stmt != call_stmt);
+#ifdef ENABLE_CHECKING
+ /* This is rather pricely check possibly trigerring construction of call stmt
+ hashtable. */
+ gcc_assert (!cgraph_edge (caller, call_stmt));
#endif
gcc_assert (is_gimple_call (call_stmt));