https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106503
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- const char junk[] Goes out of scope and you still have a reference to it. -fsanitize=address sometimes can detect this kind of problems at runtime.