https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81292
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rsandifo at gcc dot gnu.org --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The problem is that we hit: if (si != NULL) { if (!si->full_string_p && !si->stmt) { /* Until now we only had a lower bound on the string length. Install LHS as the actual length. */ si = unshare_strinfo (si); si->nonzero_chars = lhs; si->full_string_p = true; } return; } in handle_builtin_strlen, which changes just that single strinfo record, but doesn't do anything for the related ones. And as strlen doesn't have a vdef (it is a pure function), nothing is invalidated, so we end up with a mixture of related strinfos where some strinfos are full_string_p and others are not, and e.g. zero_length_string has asserts that this does not happen. So, either handle_builtin_strlen needs to adjust also the related strinfos if any (note, maybe even if verify_related_strinfos fails we might need to do that or invalidate them manually), or we need to invalidate them, or not to record this change if we can't adjust or invalidate them all.