On 2015.08.29 at 12:14 +0200, Markus Trippelsdorf wrote: > index 1eacb8be9a44..29a7f1f22169 100644 > --- a/gcc/cp/constexpr.c > +++ b/gcc/cp/constexpr.c > @@ -4276,10 +4276,10 @@ potential_constant_expression_1 (tree t, bool > want_rval, bool strict, > case IF_STMT: > if (!RECUR (IF_COND (t), rval)) > return false; > - if (!RECUR (THEN_CLAUSE (t), any)) > - return false; > - if (!RECUR (ELSE_CLAUSE (t), any)) > - return false; > + if (integer_nonzerop (IF_COND (t)) && !RECUR (THEN_CLAUSE (t), any)) > + return false; > + if (integer_zerop (IF_COND (t)) && !RECUR (ELSE_CLAUSE (t), any)) > + return false;
Sorry for messing up the formating of the return statements. I've fixed this locally already. -- Markus