Simply execute: $ gcc -fdump-tree-all -fdump-rtl-all -save-temps -O3 -flto -g3 \ reduction1.c reduction.c -o reduction && ./reduction ffffffff and observe that the high 32 bits of the dpyinfo pointer in the saved event are truncated, as would be expected from these expressions: ev_12 = MEM [(union buffered_input_event *)&main_inev]; [...] MEM [(union buffered_input_event *)&kbd_buffer] = ev_12; MEM [(union buffered_input_event *)&kbd_buffer + 4B] = ev$ie$code_16; MEM [(union buffered_input_event *)&kbd_buffer + 8B] = ev$ie$modifiers_1; MEM [(union buffered_input_event *)&kbd_buffer + 16B] = ev$ie$device_6; With aggregate access expansion disabled, all is normal: $ gcc -fdump-tree-all -fdump-rtl-all -fno-tree-sra -save-temps \ -O3 -flto -g3 reduction1.c reduction.c -o reduction && ./reduction ffffffffffffffff In a word, tampering with optimizer options is tantamount to playing with fire. Don't do it, if your object is a functioning Emacs.