https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84468
--- Comment #11 from Romain Geissler <romain.geissler at amadeus dot com> --- Hi, Indeed this version of the patch doesn't have any segv. However it seems that it doesn't fix anymore the initial bug report. Does it actually passes the new tests you introduced in your patch ? Unless I am mistaken (I am pretty sure I have applied the patch), the following code extracted from your tests still emit a warning with -O2 <<EOF #define strncpy __builtin_strncpy struct A { char a[4]; }; void succ (struct A *p, const struct A *q) { /* Verify that the assignment suppresses the warning for the conditional strcnpy call. The conditional should be folded to true since the address of an array can never be null (see bug 84470). */ if (q->a) strncpy (p->a, q->a, sizeof p->a - 1); /* { dg-bogus "\\\[-Wstringop-truncation" } */ p->a[sizeof p->a - 1] = 0; } EOF