https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109550
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |24639 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- The idea is that when you pass a const qualified pointer to a function you are expected to read from it, not only use the pointer as value. It's a heuristic that works as designed. You can add __attribute__((access(none, 1))) to the function 'f' to tell the compiler it is in fact not inspecting the memory pointed to by the first argument. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24639 [Bug 24639] [meta-bug] bug to track all Wuninitialized issues