This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/84468] [8 Regression] bogus -Wstringop-truncation despite assignment after conditional strncpy


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]