http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47337
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P1 CC| |jakub at gcc dot gnu.org Target Milestone|--- |4.6.0 Summary|memory unsafety bug leading |[4.6 Regression] memory |to wrong code generation |unsafety bug leading to | |wrong code generation --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-01-18 09:04:46 UTC --- Confirmed, goes away with -fno-partial-inlining, happens only with -m32. >From brief look at it it looks like a RTL DCE bug, it removes a __divdi3 call, but takes away with it also a needed unrelated store: (insn 203 105 204 6 (set (mem:SI (plus:SI (reg/f:SI 7 sp) (const_int 8 [0x8])) [0 S4 A32]) (const_int 10 [0xa])) pr47337.c:14 64 {*movsi_internal} (nil)) (insn 204 203 205 6 (set (mem:SI (plus:SI (reg/f:SI 7 sp) (const_int 12 [0xc])) [0 S4 A32]) (const_int 0 [0])) pr47337.c:14 64 {*movsi_internal} (nil)) (insn 205 204 206 6 (set (mem:SI (reg/f:SI 7 sp) [0 S4 A32]) (const_int 0 [0])) pr47337.c:14 64 {*movsi_internal} (nil)) (insn 206 205 190 6 (set (mem:SI (plus:SI (reg/f:SI 7 sp) (const_int 4 [0x4])) [0 S4 A32]) (const_int 0 [0])) pr47337.c:14 64 {*movsi_internal} (nil)) (insn 190 206 110 6 (set (mem/c:SI (plus:SI (reg/f:SI 7 sp) (const_int 28 [0x1c])) [5 S4 A32]) (reg:SI 2 cx)) pr47337.c:14 64 {*movsi_internal} (expr_list:REG_DEAD (reg:SI 2 cx) (nil))) (call_insn/u 110 190 179 6 (set (reg:DI 0 ax) (call (mem:QI (symbol_ref:SI ("__divdi3") [flags 0x41]) [0 S1 A8]) (const_int 16 [0x10]))) pr47337.c:14 927 {*call_value_0} (expr_list:REG_UNUSED (reg:DI 0 ax) (expr_list:REG_EH_REGION (const_int -2147483648 [0xffffffff80000000]) (nil))) (expr_list:REG_DEP_TRUE (use (mem:DI (reg/f:SI 7 sp) [0 S8 A8])) (expr_list:REG_DEP_TRUE (use (mem:DI (plus:SI (reg/f:SI 7 sp) (const_int 8 [0x8])) [0 S8 A8])) (nil)))) The sp+0x1c store shouldn't be deleted, but it is.