re PR c++/91974 (function not sequenced before function argument)
authorJakub Jelinek <jakub@redhat.com>
Fri, 4 Oct 2019 06:54:05 +0000 (08:54 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 4 Oct 2019 06:54:05 +0000 (08:54 +0200)
commit708935b2b44663505a1cccf1a4aec80b310d0052
tree76c2aaee541f5a226be94bd8a91efde5aa4e5acb
parentcf09ecdb94d617f740e938c476252e61dffacc29
re PR c++/91974 (function not sequenced before function argument)

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.

From-SVN: r276562
gcc/cp/ChangeLog
gcc/cp/cp-gimplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1z/eval-order5.C [new file with mode: 0644]