------- Additional Comments From e9925248 at stud4 dot tuwien dot ac dot at  
2005-08-16 21:20 -------
I think, I found the cause of this:
cgraph_early_inlining holds a list of cgraph nodes in the array order.

In this example, cgraph_decide_inlining_incrementally removes all references
known by the garbage collector to a node contained in this array, which has not
been processed. Then it calls the ggc_collect. With checking enabled, the freed
memory is overwritten so that the following access cause a segementation fault.

If the call to the garbage collector in cgraph_decide_inlining_incrementally is
removed, the file compiles:
Index: ipa-inline.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ipa-inline.c,v
retrieving revision 2.15
diff -u -p -r2.15 ipa-inline.c
--- ipa-inline.c        28 Jul 2005 21:45:25 -0000      2.15
+++ ipa-inline.c        16 Aug 2005 21:18:18 -0000
@@ -1073,7 +1073,6 @@ cgraph_decide_inlining_incrementally (st
       node->local.self_insns = node->global.insns;
       current_function_decl = NULL;
       pop_cfun ();
-      ggc_collect ();
     }
   return inlined;
 }

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23408

Reply via email to