diff options
Diffstat (limited to 'gcc/tree-ssa-loop-ivopts.c')
-rw-r--r-- | gcc/tree-ssa-loop-ivopts.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index cb5f054..cab5acf 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -1485,8 +1485,8 @@ extract_cond_operands (struct ivopts_data *data, gimple stmt, /* The objects returned when COND has constant operands. */ static struct iv const_iv; static tree zero; - tree *op0 = &zero, *op1 = &zero, *tmp_op; - struct iv *iv0 = &const_iv, *iv1 = &const_iv, *tmp_iv; + tree *op0 = &zero, *op1 = &zero; + struct iv *iv0 = &const_iv, *iv1 = &const_iv; bool ret = false; if (gimple_code (stmt) == GIMPLE_COND) @@ -1517,8 +1517,8 @@ extract_cond_operands (struct ivopts_data *data, gimple stmt, if (integer_zerop (iv0->step)) { /* Control variable may be on the other side. */ - tmp_op = op0; op0 = op1; op1 = tmp_op; - tmp_iv = iv0; iv0 = iv1; iv1 = tmp_iv; + std::swap (op0, op1); + std::swap (iv0, iv1); } ret = !integer_zerop (iv0->step) && integer_zerop (iv1->step); |