https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66616
--- Comment #17 from Martin Jambor <jamborm at gcc dot gnu.org> --- Yesterday Honza told me on IRC to check that the new artificial thunk has local flag set. However, it appears that it does (in set_new_clone_decl_and_node_flags), so I am going to investigate further.