aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/utils.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-10-11 09:36:07 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2019-10-11 09:36:07 +0200
commit1a37b6d9a7e57c71b1bfe449ebd275eb408117fb (patch)
treefe29653bb010efc768398510adcd8af902405b71 /gcc/ada/gcc-interface/utils.c
parent1e99e6fe6bb61ad2011030324cfdf84d2a67e75d (diff)
downloadgcc-1a37b6d9a7e57c71b1bfe449ebd275eb408117fb.zip
gcc-1a37b6d9a7e57c71b1bfe449ebd275eb408117fb.tar.gz
gcc-1a37b6d9a7e57c71b1bfe449ebd275eb408117fb.tar.bz2
re PR c++/91987 (-fstrict-eval-order issues)
PR c++/91987 cp/ * decl2.c (grok_array_decl): For -fstrong-eval-order, when array ref operands have been swapped and at least one operand has side-effects, revert the swapping before calling build_array_ref. * typeck.c (cp_build_array_ref): For non-ARRAY_TYPE array ref with side-effects on the index operand, if -fstrong-eval-order use save_expr around the array operand. (cp_build_binary_op): For shifts with side-effects in the second operand, wrap first operand into SAVE_EXPR and evaluate it before the shift. * semantics.c (handle_omp_array_sections_1): Temporarily disable flag_strong_eval_order during OMP_CLAUSE_REDUCTION array section processing. * cp-gimplify.c (gimplify_to_rvalue): New function. (cp_gimplify_expr): Use it. testsuite/ * g++.dg/cpp1z/eval-order6.C: New test. * g++.dg/cpp1z/eval-order7.C: New test. * g++.dg/cpp1z/eval-order8.C: New test. * c-c++-common/gomp/pr91987.c: New test. From-SVN: r276860
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
0 files changed, 0 insertions, 0 deletions