From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21410 invoked by alias); 27 Aug 2011 07:28:11 -0000 Received: (qmail 21402 invoked by uid 22791); 27 Aug 2011 07:28:09 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (140.186.70.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 27 Aug 2011 07:27:53 +0000 Received: from eggs.gnu.org ([140.186.70.92]:49303) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QxDJ2-0006qK-UL for gcc@gnu.org; Sat, 27 Aug 2011 03:27:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QxDJ0-0006rJ-Vx for gcc@gnu.org; Sat, 27 Aug 2011 03:27:52 -0400 Received: from mail-yw0-f41.google.com ([209.85.213.41]:34801) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QxDJ0-0006ql-S0 for gcc@gnu.org; Sat, 27 Aug 2011 03:27:50 -0400 Received: by ywm13 with SMTP id 13so3730265ywm.0 for ; Sat, 27 Aug 2011 00:27:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.94.15 with SMTP id r15mr2903261ybb.79.1314430069610; Sat, 27 Aug 2011 00:27:49 -0700 (PDT) Received: by 10.150.57.5 with HTTP; Sat, 27 Aug 2011 00:27:49 -0700 (PDT) In-Reply-To: <20110827024737.GA2292@excelsa.csse.unimelb.edu.au> References: <20110827024737.GA2292@excelsa.csse.unimelb.edu.au> Date: Sat, 27 Aug 2011 07:28:00 -0000 Message-ID: Subject: Re: Inline Expansion Problem From: Richard Guenther To: Matt Davis Cc: gcc@gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.213.41 X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2011-08/txt/msg00429.txt.bz2 On Sat, Aug 27, 2011 at 4:47 AM, Matt Davis wrote: > Hello, > I am having the compiler insert a call to a function which is defined ins= ide > another object file. =A0However, during inline expansion via expand_call_= inline(), > the following assertion fails in tree-inline.c: >>> 3775: edge =3D cgraph_edge (id->dst_node, stmt); >>> 3776: gcc_checking_assert (cg_edge); > > cg_node comes back as being NULL since there is only one callee and no in= direct > calls, the function that has the inserted call is main(). =A0Is there som= ething I > forgot to do after inserting the gimple call statement? =A0This works fin= e without > optimization. Dependent on where you do it you have to add/rebuild cgraph edges. Richard. > -Matt >