https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106935

Martin Jambor <jamborm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu.org

--- Comment #4 from Martin Jambor <jamborm at gcc dot gnu.org> ---
We hit an assert guarding that we have not already massaged call
arguments before modifying them during call redirection as that would
end up in wring code.  We do that by looking first whether the decl in
the statement is the same as the decl of the cgraph_edge callee and if
not, if the node associated with the decl from the statement has any
parameter adjustment info.

The issue here is that we are in the process of inlining an artificial
thunk, which calls to a cgraph_node clone with adjustments from its
inception.  That would normally not be a problem because of the first
check above (both decls would be the same, we don't really redirect
these calls, not even in this case).  But the call is actually
recursive, and so the decl from the call graph edge is one created by
save_inline_function_body whereas the one in the statement is the
original one.

I guess we need to detect this particular situation.

Reply via email to