https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97708
--- Comment #20 from Jakub Jelinek <jakub at gcc dot gnu.org> --- But the user didn't do anything wrong, perhaps just had bad expectations. The user asked put the value of this variable into a general purpose register or memory. So the compiler did that.