https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115404
--- Comment #3 from Uroš Bizjak <ubizjak at gmail dot com> --- (In reply to Sergei Trofimovich from comment #0) > if (__builtin_add_overflow ((uintptr_t) string, maxlen, &end)) > end = -1; > > Could it be that dead store to `&end` somehow conflicts with a following > `end = -1`? FYI, this is not dead store, the two lines above are exactly what middle-end now transforms to a .SAT_ADD. The function returns -1 (AKA INT_MAX) when addition overflows.