------- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-10 17:30 ------- (In reply to comment #10) > I think we should produce an empty CONSTRUCTOR (which I am testing right now). That did not fix it, we still get code generated for the "empty" struct: ;; D.1594 = {} (nil)
;; foo (D.1594) [tail call] (insn 10 8 11 (set (mem:QI (reg/f:SI 56 virtual-outgoing-args) [0 S1 A32]) (reg:QI 58 [ D.1594 ])) -1 (nil) (nil)) (call_insn 11 10 0 (call (mem:QI (symbol_ref:SI ("_Z3foo1X") [flags 0x41] <function_decl 0x41e9ea6c foo>) [0 S1 A8]) (const_int 4 [0x4])) -1 (nil) (nil) (nil)) But on PPC we get: ;; D.1588 = {} (nil) ;; foo (D.1588) [tail call] (insn 10 8 11 0 (set (reg:QI 3 r3) (reg:QI 118 [ D.1588 ])) -1 (nil) (nil)) (call_insn/j 11 10 12 0 (parallel [ (call (mem:SI (symbol_ref:SI ("_Z3foo1X") [flags 0x41] <function_decl 0x41d9f984 foo>) [0 S4 A8]) (const_int 32 [0x20])) (use (const_int 0 [0x0])) (use (reg:SI 119)) (return) ]) -1 (nil) (nil) (expr_list:REG_DEP_TRUE (use (reg:QI 3 r3)) (nil))) See the difference is that we pass on ppc via a register but on x86 we pass via the stack. I don't know a way to fix this with a front-end change. -- What |Removed |Added ---------------------------------------------------------------------------- Component|c++ |middle-end http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20408