https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114430
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2024-03-22 Ever confirmed|0 |1 Component|c |tree-optimization Keywords| |diagnostic Sam James <sjames at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sjames at gcc dot gnu.org Summary|False positive for -Wformat |[11/12/13/14/15 regression] | |False positive for | |-Wformat-overflow --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. This is because we end up with <bb 2> [local count: 268435458]: __builtin_strcpy (&item, &WWPersons); __builtin_strcpy (&item, &MEM <struct WWPerson[3]> [(void *)&WWPersons + 12B]); __builtin_strcpy (&item, &MEM <struct WWPerson[3]> [(void *)&WWPersons + 24B]); [tail call] return; First of all the laddress pass decomposes the &WWPersons[i_3].Name address. Disabling that has FRE after cunroll replace &WWPersons[i_15].Name with the above form. That's because of how gimple_fold_stmt_to_constant_1 handles valueization of such ref. This in the end confuses the diagnostic machinery.