https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91501
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #3)
> The problem is here:
> /* Also strip a TARGET_EXPR that would force an extra copy. */
> if (TREE_CODE (*arg_p) == TARGET_EXPR)
> {
> tree init = TARGET_EXPR_INITIAL (*arg_p);
> if (init
> && !VOID_TYPE_P (TREE_TYPE (init)))
> *arg_p = init;
> }
>
> --- CUT ---
> We don't do what gimplify_target_expr does:
> /* Add a clobber for the temporary going out of scope, like
> gimplify_bind_expr. */
But that temp is not created until much later in internal_get_tmp_var.
Someone who understands the gimplifier better can/should be able to handle this
easily.