https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106489

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |DUPLICATE

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed by r12-6862

    c++: assignment to temporary [PR59950]

    Given build_this of a TARGET_EXPR, cp_build_fold_indirect_ref returns the
    TARGET_EXPR.  But that's the wrong value category for the result of the
    defaulted class assignment operator, which returns an lvalue, so we need to
    actually build the INDIRECT_REF.

            PR c++/59950

    gcc/cp/ChangeLog:

            * call.cc (build_over_call): Use cp_build_indirect_ref.

    gcc/testsuite/ChangeLog:

            * g++.dg/init/assign2.C: New test.

*** This bug has been marked as a duplicate of bug 59950 ***

Reply via email to