+2010-10-14 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/45969
+ * c-typeck.c (build_binary_op): Don't try to compute a semantic
+ type with excess precision for boolean operations.
+
2010-10-14 Jeremie Salvucci <jeremie.salvucci@free.fr>
Basile Starynkevitch <basile@starynkevitch.net>
precision. */
bool may_need_excess_precision;
+ /* True means this is a boolean operation that converts both its
+ operands to truth-values. */
+ bool boolean_op = false;
+
if (location == UNKNOWN_LOCATION)
location = input_location;
op0 = c_common_truthvalue_conversion (location, op0);
op1 = c_common_truthvalue_conversion (location, op1);
converted = 1;
+ boolean_op = true;
}
if (code == TRUTH_ANDIF_EXPR)
{
if (build_type == NULL_TREE)
{
build_type = result_type;
- if (type0 != orig_type0 || type1 != orig_type1)
+ if ((type0 != orig_type0 || type1 != orig_type1)
+ && !boolean_op)
{
gcc_assert (may_need_excess_precision && common);
semantic_result_type = c_common_type (orig_type0, orig_type1);
+2010-10-14 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/45969
+ * gcc.c-torture/compile/pr45969-1.c: New test.
+
2010-10-14 Richard Guenther <rguenther@suse.de>
PR lto/45382