This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Inline Expansion Problem
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Matt Davis <mattdavis9 at gmail dot com>
- Cc: gcc at gnu dot org
- Date: Sat, 27 Aug 2011 09:27:49 +0200
- Subject: Re: Inline Expansion Problem
- References: <20110827024737.GA2292@excelsa.csse.unimelb.edu.au>
On Sat, Aug 27, 2011 at 4:47 AM, Matt Davis <mattdavis9@gmail.com> wrote:
> Hello,
> I am having the compiler insert a call to a function which is defined inside
> another object file. ?However, during inline expansion via expand_call_inline(),
> the following assertion fails in tree-inline.c:
>>> 3775: edge = 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 indirect
> calls, the function that has the inserted call is main(). ?Is there something I
> forgot to do after inserting the gimple call statement? ?This works fine without
> optimization.
Dependent on where you do it you have to add/rebuild cgraph edges.
Richard.
> -Matt
>