From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12083 invoked by alias); 19 Jul 2006 13:19:51 -0000 Received: (qmail 12036 invoked by uid 48); 19 Jul 2006 13:19:41 -0000 Date: Wed, 19 Jul 2006 13:19:00 -0000 Message-ID: <20060719131941.12035.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/27882] [4.1/4.2 regression] segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-07/txt/msg01503.txt.bz2 List-Id: ------- Comment #22 from rguenth at gcc dot gnu dot org 2006-07-19 13:19 ------- I see what the problem is. cgraph_postorder doesn't help us if we're having a cycle like here, so nnodes = cgraph_postorder (order); for (i = nnodes - 1; i >= 0; i--) { node = order[i]; if (node->analyzed && node->local.inlinable && (node->needed || node->reachable) && node->callers) { if (cgraph_decide_inlining_incrementally (node, true)) ggc_collect (); } } after inlining into foo, which we do first, bar is no longer referenced and is collected. We still reference it from order[0] though. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27882