https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105459
--- Comment #12 from Kewen Lin <linkw at gcc dot gnu.org> --- Created attachment 53068 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53068&action=edit tested patch Once the optimization node of the caller has changed, we need to rebuild the target node in the context of new optimization node, and update the target node if it changes as well.