https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63618
Bug ID: 63618 Summary: CSE at IRA pass delete SET_GOT which is used later Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: evstupac at gmail dot com Test failed on execution compiled with: gcc elim_set_got.c -fPIE -m32 -msse4.2 -O2 -fno-inline -mtune=corei7 ./a.out Segmentation fault (core dumped) That occurs because CSE delete SET_GOT at IRA as it has no uses. However the instruction: (insn 20 17 21 3 (set (mem:TF (pre_dec:SI (reg/f:SI 7 sp)) [2 S16 A128]) (const_double:TF 1.0e+9 [0x0.ee6b28p+30])) elim_setgot.c:26 121 {*pushtf} (expr_list:REG_ARGS_SIZE (const_int 16 [0x10]) (nil))) have hidden use of GOT register as it is split into: (insn 45 47 46 3 (set (reg:SI 0 ax [92]) (plus:SI (reg:SI 0 ax [87]) (const:SI (unspec:SI [ (symbol_ref/u:SI ("*.LC2") [flags 0x2]) ] UNSPEC_GOTOFF)))) elim_setgot.c:26 213 {*leasi} (expr_list:REG_EQUAL (symbol_ref/u:SI ("*.LC2") [flags 0x2]) (nil))) (insn 46 45 20 3 (set (reg:TF 23 xmm2 [93]) (mem/u/c:TF (reg:SI 0 ax [92]) [2 S16 A128])) elim_setgot.c:26 126 {*movtf_internal} (nil))