https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87370
H.J. Lu <hjl.tools at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|hjl at gcc dot gnu.org |hjl.tools at gmail dot com --- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> --- For f2 () { struct B D.2315; ;; basic block 2, loop depth 0 ;; pred: ENTRY D.2315 = {}; return D.2315; ;; succ: EXIT } C++ front-end generates: (insn 5 2 6 2 (set (mem/j/c:TI (plus:DI (reg/f:DI 78 virtual-stack-vars) (const_int -16 [0xfffffffffffffff0])) [0 D.2315+0 S16 A128]) (const_int 0 [0])) "x.ii":8 -1 (nil)) (insn 6 5 7 2 (set (reg:DI 85) (mem/j/c:DI (plus:DI (reg/f:DI 78 virtual-stack-vars) (const_int -16 [0xfffffffffffffff0])) [0 D.2315+0 S8 A128])) "x. ii":8 -1 (nil)) (insn 7 6 8 2 (set (reg:DI 86) (mem/j/c:DI (plus:DI (reg/f:DI 78 virtual-stack-vars) (const_int -8 [0xfffffffffffffff8])) [0 D.2315+8 S8 A64])) "x.ii ":8 -1 (nil)) (insn 8 7 9 2 (set (reg:DI 83 [ <retval> ]) (reg:DI 85)) "x.ii":8 -1 (nil)) (insn 9 8 13 2 (set (reg:DI 84 [ <retval>+8 ]) (reg:DI 86)) "x.ii":8 -1 (nil)) (insn 13 9 14 2 (set (reg:DI 0 ax) (reg:DI 83 [ <retval> ])) "x.ii":9 -1 (nil)) (insn 14 13 15 2 (set (reg:DI 1 dx) (reg:DI 84 [ <retval>+8 ])) "x.ii":9 -1 (nil)) (insn 15 14 16 2 (use (reg:DI 0 ax)) "x.ii":9 -1 (nil)) (insn 16 15 0 2 (use (reg:DI 1 dx)) "x.ii":9 -1 (nil)) Why can't C++ front-end generate better RTL?