http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49429
--- Comment #8 from Easwaran Raman <eraman at google dot com> 2011-06-16 16:27:44 UTC --- Compiling x.c with a ia64-unknown-linux cross compiler, setting a breakpoint in can_escape(), I see that, (gdb) p debug_rtx (body) (set (mem/s/c:DI (reg/f:DI 341) [2 s1+0 S8 A64]) (reg:DI 112 in0)) This is part of an instruction that gets removed: (insn 4 3 6 2 (set (mem/s/c:DI (reg/f:DI 341) [2 s1+0 S8 A64]) (reg:DI 112 in0)) y.c:23 5 {movdi_internal} (expr_list:REG_DEAD (reg:DI 112 in0) (nil))) (gdb) p expr->base.code $24 = PARM_DECL (gdb) p may_be_aliased (expr) $23 = 0 '\000' So can_escape() returns false. But later on, in the same BB, I see: (insn 36 30 37 2 (set (reg:DI 120 out0) (reg/f:DI 357)) 5 {movdi_internal} (expr_list:REG_EQUAL (plus:DI (reg/f:DI 328 sfp) (const_int 62 [0x3e])) (nil))) (insn 37 36 38 2 (set (reg:DI 121 out1) (reg/f:DI 341)) 5 {movdi_internal} (expr_list:REG_DEAD (reg/f:DI 341) (expr_list:REG_EQUAL (plus:DI (reg/f:DI 328 sfp) (const_int 96 [0x60])) (nil)))) (insn 38 37 39 2 (set (reg:DI 122 out2) (const_int 31 [0x1f])) 5 {movdi_internal} (nil)) (call_insn 39 38 42 2 (parallel [ (set (reg:DI 8 r8) (call (mem:DI (symbol_ref:DI ("memcpy") [flags 0x41] <function_decl 0x7ffff70d2e00 memcpy>) [0 memcpy S8 A64]) (const_int 1 [0x1]))) (clobber (reg:DI 320 b0)) (clobber (scratch:DI)) (clobber (scratch:DI)) ]) 332 {call_value_gp} (expr_list:REG_DEAD (reg:DI 122 out2) (expr_list:REG_DEAD (reg:DI 121 out1) (expr_list:REG_DEAD (reg:DI 120 out0) (expr_list:REG_UNUSED (reg:DI 8 r8) (expr_list:REG_EH_REGION (const_int 0 [0]) (nil)))))) (expr_list:REG_DEP_TRUE (use (reg:DI 1 r1)) (expr_list:REG_DEP_TRUE (use (reg:DI 122 out2)) (expr_list:REG_DEP_TRUE (use (reg:DI 121 out1)) (expr_list:REG_DEP_TRUE (use (reg:DI 120 out0)) (nil)))))) reg 341 is passed as source argument of a memcpy. Why does the expression return 0 for may_be_aliased()?