https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105864
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Ivan Sorokin from comment #0) > Currently storing a nullptr_t to memory causes 0 to be written to that > memory. As there is no way to read this value back without invoking > undefined behavior I believe GCC can omit storing it. You can use that value to store 0 to another pointer type, and you can pass it to a printf-style varargs function (which is passed as (void*)0). Both of those could be made to store 0 as needed, but maybe it simplifies things to store it early and then the later uses are just bitwise copies of the zero value.