+2011-09-26 Jason Merrill <jason@redhat.com>
+
+ PR c++/50508
+ * semantics.c (cxx_eval_logical_expression): Use tree_int_cst_equal
+ rather than ==.
+
2011-09-26 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/45487
allow_non_constant, addr,
non_constant_p);
VERIFY_CONSTANT (lhs);
- if (lhs == bailout_value)
+ if (tree_int_cst_equal (lhs, bailout_value))
return lhs;
- gcc_assert (lhs == continue_value);
+ gcc_assert (tree_int_cst_equal (lhs, continue_value));
r = cxx_eval_constant_expression (call, TREE_OPERAND (t, 1),
allow_non_constant, addr, non_constant_p);
VERIFY_CONSTANT (r);
--- /dev/null
+// PR c++/50508
+// { dg-options -std=c++0x }
+
+template <class T>
+ struct integral_constant {
+ typedef T value_type;
+ constexpr operator value_type() { return true; }
+ };
+
+static constexpr bool value = integral_constant<bool>()
+ && true;