https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86092
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- static char* const kern_buff_p; You told the compiler it is constant and won't change values and then you changed the value behind its back. I think the kernel has a write once attribute instead.