https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112723
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Ah, with -fwrapv. Without -fwrapv the testcase invokes UB always, either the first c + c overflows or the second one, or the c += -2147483647 - 1; overflows.