From a6b75a69dae0cfaa9085708073ebd1853e0e6102 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Mon, 3 Sep 2018 15:35:35 +0200 Subject: [PATCH] Fix thinko (PR tree-optimization/87201). 2018-09-03 Martin Liska PR tree-optimization/87201 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes): Fix parenthesis in an expression. From-SVN: r264058 --- gcc/ChangeLog | 6 ++++++ gcc/tree-switch-conversion.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cd3c0e8178f..40795e7ad39 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-09-03 Martin Liska + + PR tree-optimization/87201 + * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes): + Fix parenthesis in an expression. + 2018-09-03 Richard Biener PR tree-optimization/87197 diff --git a/gcc/tree-switch-conversion.c b/gcc/tree-switch-conversion.c index d7d1c3972a0..1f543b2ecc8 100644 --- a/gcc/tree-switch-conversion.c +++ b/gcc/tree-switch-conversion.c @@ -1942,8 +1942,8 @@ switch_decision_tree::balance_case_nodes (case_tree_node **head, /* Skip nodes while their probability does not reach that amount. */ prob -= (*npp)->m_c->m_prob; - if (prob.initialized_p () - && (prob < pivot_prob || ! (*npp)->m_right)) + if ((prob.initialized_p () && prob < pivot_prob) + || ! (*npp)->m_right) break; npp = &(*npp)->m_right; } -- 2.30.2