]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR middle-end/37448 (cannot compile big function)
authorJan Hubicka <jh@suse.cz>
Thu, 11 Sep 2008 12:38:57 +0000 (14:38 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 11 Sep 2008 12:38:57 +0000 (12:38 +0000)
PR middle-end/37448
* cgraph.c (cgraph_create_edge): Use !cgraph_edge for sanity check.

From-SVN: r140284

gcc/ChangeLog
gcc/cgraph.c

index d7a06fbb38e7f4702f8bcba485643e69ab229fca..a0d08c59d023db4ff91525a1dc6b0583bb93799f 100644 (file)
@@ -1,3 +1,8 @@
+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
index a12ed155b458088cd44b81d65b424a788737bb13..03e5e79d461807af49fcfa634f23972168c378dd 100644 (file)
@@ -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));