https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64185
Marek Polacek <mpolacek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |mpolacek at gcc dot gnu.org Resolution|--- |INVALID --- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> --- -fsanitize=undefined says q.c:71:22: runtime error: index 1 out of bounds for type 'kv_t [1]' q.c:73:20: runtime error: index 3 out of bounds for type 'kv_t [1]' An out-of-bounds access is not just something that "looks not clean", it is a bug, you're triggering undefined behavior so all bets are off. Invalid.