Tested x86_64-pc-linux-gnu, applying to trunk.

-- >8 --

Still want the conversion to bool.

gcc/cp/ChangeLog:

        * constexpr.cc (find_failing_clause_r): Re-add the call to
        contextual_conv_bool.
---
 gcc/cp/constexpr.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/cp/constexpr.cc b/gcc/cp/constexpr.cc
index 39bb023b79c..15b4f2c4a08 100644
--- a/gcc/cp/constexpr.cc
+++ b/gcc/cp/constexpr.cc
@@ -1887,7 +1887,8 @@ find_failing_clause_r (const constexpr_ctx *ctx, tree 
expr)
        e = find_failing_clause_r (ctx, TREE_OPERAND (expr, 1));
       return e;
     }
-  tree e = fold_operand (expr, ctx);
+  tree e = contextual_conv_bool (expr, tf_none);
+  e = fold_operand (e, ctx);
   if (integer_zerop (e))
     /* This is the failing clause.  */
     return expr;

base-commit: e6a29aab51122103e677ffed523371c9c816ec98
-- 
2.31.1

Reply via email to