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

--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:4cbc71691e47b1ca6b64feb0af678606705d2f92

commit r13-5316-g4cbc71691e47b1ca6b64feb0af678606705d2f92
Author: Jason Merrill <ja...@redhat.com>
Date:   Mon Jan 23 17:14:11 2023 -0500

    c++: TARGET_EXPR_ELIDING_P and std::move [PR107267]

    With -ffold-simple-inlines, we turn calls to std::move into the static_cast
    equivalent.  In this testcase, this exposes the FindResult temporary to
copy
    elision which is not specified by the standard, through an optimization in
    gimplify_modify_expr_rhs.  Since the type is not TREE_ADDRESSABLE, this is
    not detectable by the user, so we just need to soften the assert.

            PR c++/107267

    gcc/cp/ChangeLog:

            * cp-gimplify.cc (cp_gimplify_init_expr): Allow unexpected elision
            of trivial types.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/move2.C: New test.

Reply via email to