aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 21e014b..ba20353 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -8917,12 +8917,13 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl,
break;
case OMP_ATOMIC:
- {
- tree op0, op1;
- op0 = RECUR (TREE_OPERAND (t, 0));
- op1 = RECUR (TREE_OPERAND (t, 1));
- finish_omp_atomic (OMP_ATOMIC_CODE (t), op0, op1);
- }
+ if (OMP_ATOMIC_DEPENDENT_P (t))
+ {
+ tree op1 = TREE_OPERAND (t, 1);
+ tree lhs = RECUR (TREE_OPERAND (op1, 0));
+ tree rhs = RECUR (TREE_OPERAND (op1, 1));
+ finish_omp_atomic (TREE_CODE (op1), lhs, rhs);
+ }
break;
default: