https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82027
--- Comment #9 from Martin Jambor <jamborm at gcc dot gnu.org> --- We create an "artificial_thunk" for an IPA-CP clone, which is really nothing but a thunk with skipped arguments but we do not stream its args_to_skip because output_cgraph_opt_summary_p returns false because at streaming time at least, its clone_of is NULL. In WPA we modify the arguments of the artificial thunk and in ltrans we are supposed to deal with the calls as instructed by the args_to_skip bitmap, which leads to argument mismatch. I'll continue investigating where exactly the clone_of is cleared and/or whether the streaming logic needs to be adjusted somehow.