https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91974
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Thu Nov 21 17:12:57 2019 New Revision: 278577 URL: https://gcc.gnu.org/viewcvs?rev=278577&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-8-branch/gcc/testsuite/g++.dg/cpp1z/eval-order5.C Modified: branches/gcc-8-branch/gcc/cp/ChangeLog branches/gcc-8-branch/gcc/cp/cp-gimplify.c branches/gcc-8-branch/gcc/testsuite/ChangeLog