[Bug ipa/93621] [10 Regression] ICE in redirect_call_stmt_to_callee, at cgraph.c:1443 since r10-5567

hubicka at ucw dot cz gcc-bugzilla@gcc.gnu.org
Fri Apr 3 09:15:28 GMT 2020


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

--- Comment #12 from Jan Hubicka <hubicka at ucw dot cz> ---
> Having said that, I am not sure where to best fix this so late in the
> GCC 10 development cycle.

So the problem is that thunk is expanded on the adjusted decl but we
still keep the adjustments and later fail to apply them?

I guess we have two options:
 1) force thunk expansion to happen on original decls (before cloning)
    so the body ends up being same as for ordinary function
 2) remove the adjustments after expansion - this should IMO work
    under the assumption that optimization passes don't insert
    non-trivial code into the thunk before they expand the thunk (i.e.
    if you want to adjust it in ipa-sra you will want to first produce
    the thunk and then do adjustement)
It seems to me that 2 should be not that hard to implement
Does that make sense?

Honza


More information about the Gcc-bugs mailing list