https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102733
--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> --- A couple of data points: I see the same behavior for any constant address (not just null). Clang 12 behaves the same as GCC, but Clang 13 emits both stores, suggesting they fixed it as a bug: https://godbolt.org/z/xn7MWc4qn