https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91974
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Mon Oct 21 11:47:09 2019 New Revision: 277256 URL: https://gcc.gnu.org/viewcvs?rev=277256&root=gcc&view=rev Log: Backported from mainline 2019-10-04 Jakub Jelinek <ja...@redhat.com> PR c++/91974 * cp-gimplify.c (cp_gimplify_expr) <case CALL_EXPR>: For -fstrong-eval-order ensure CALL_EXPR_FN side-effects are evaluated before any arguments. Additionally, ensure CALL_EXPR_FN that isn't invariant nor OBJ_TYPE_REF nor SSA_NAME is forced into a temporary. * g++.dg/cpp1z/eval-order5.C: New test. Added: branches/gcc-9-branch/gcc/testsuite/g++.dg/cpp1z/eval-order5.C Modified: branches/gcc-9-branch/gcc/cp/ChangeLog branches/gcc-9-branch/gcc/cp/cp-gimplify.c branches/gcc-9-branch/gcc/testsuite/ChangeLog