Inline Expansion Problem

Richard Guenther richard.guenther@gmail.com
Sat Aug 27 07:28:00 GMT 2011


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
>



More information about the Gcc mailing list