https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95722
--- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- See bugs 70490 and 84563 regarding atomic_load of const. The atomic_load generic function takes a pointer-to-const-atomic argument just like any other library function that takes an argument it does not modify. It's certainly valid to do an atomic load through such a pointer in a case where the original object was not defined as const but a pointer to const was passed to the function doing the load. The question is whether it is or should be valid in the case where the object was defined as const. If it is, that would constrain code sequences used in any case where the compiler cannot see that the object definitely isn't in read-only memory, including for other operations that might only be valid for writable memory but need to interact correctly with atomic_load.