This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Inline Expansion Problem


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
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]