https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79529
--- Comment #1 from Aldy Hernandez <aldyh at gcc dot gnu.org> --- Looks reasonable, thanks. I would probably check for def == NULL too, just in case: if (!def || gimple_nop_p (def)) return true; ...since I see that replace_ssa_name can set it to NULL: /* Now that we've used the def stmt to define new_name, make sure it doesn't define name anymore. */ SSA_NAME_DEF_STMT (name) = NULL; Would you care to test and submit a patch to the list?