This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/84468] [8 Regression] bogus -Wstringop-truncation despite assignment after conditional strncpy
- From: "romain.geissler at amadeus dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 24 Feb 2018 16:34:29 +0000
- Subject: [Bug tree-optimization/84468] [8 Regression] bogus -Wstringop-truncation despite assignment after conditional strncpy
- Auto-submitted: auto-generated
- References: <bug-84468-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84468
--- Comment #9 from Romain Geissler <romain.geissler at amadeus dot com> ---
Ok I was able to strip down the ICE to this very simple reproducer:
<<EOF
#include <string.h>
static char keyword[4];
static void f (void) { strncpy(keyword, "if ", 4); }
EOF