------- Additional Comments From rguenth at tat dot physik dot uni-tuebingen dot de 2005-08-13 18:11 ------- With the copy ctor we end up with
void g(A*) (a) { struct A D.1603; <bb 0>: __comp_ctor (&D.1603, a); f (&D.1603); return; } which confuses me a bit, because here the prototype of f looks like effectively void f(A*); do we use ABI information here, but not in the other case? The C++ frontend in this case presents us with { <<cleanup_point <<< Unknown tree: expr_stmt f (&TARGET_EXPR <D.1603, <<< Unknown tree: aggr_init_expr __comp_ctor 0B, (struct A &) (struct A *) NON_LVALUE_EXPR <a> D.1603 >>> >) >>> >>; } where in the case w/o the copy ctor we have <<cleanup_point <<< Unknown tree: expr_stmt f (TARGET_EXPR <D.1608, *(struct A &) (struct A *) NON_LVALUE_EXPR <a>>) >>> >>; is there some different wording about by-value parameter passing with or without explicit copy ctor in the C++ standard?! I.e., why isn't the above <<cleanup_point <<< Unknown tree: expr_stmt f (&TARGET_EXPR <D.1608, *(struct A &) (struct A *) NON_LVALUE_EXPR <a>>) >>> >>; ? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23372