https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108217
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The problem with const is GCC does not have an idea of a store once and then become constant. an example of that would be: ``` void ExternFunc(const int*); int f(); int Bad() { const int i = f(); const int* pi = &i; ExternFunc(pi); return *pi; } int Good() { const int i = f(); ExternFunc(&i); return i; } ``` This is similar to LLVM/clang really because this does not come up that much.