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.