Commit 25216284 by Richard Kenner

(fold): When folding `<' type nodes, make true_value and false_value

have correct types.

From-SVN: r9899
parent d36c3fe2
......@@ -2615,7 +2615,7 @@ range_test (jcode, type, lo_code, hi_code, var, lo_cst, hi_cst)
}
/* Subroutine for fold_truthop: C is an INTEGER_CST interpreted as a P
bit value. Arrange things so the extra bits will be set to zero if and]
bit value. Arrange things so the extra bits will be set to zero if and
only if C is signed-extended to its full width. */
static tree
......@@ -3270,9 +3270,10 @@ fold (expr)
}
else
{
tree testtype = TREE_TYPE (arg1);
test = arg1;
true_value = integer_one_node;
false_value = integer_zero_node;
true_value = convert (testtype, integer_one_node);
false_value = convert (testtype, integer_zero_node);
}
/* If ARG0 is complex we want to make sure we only evaluate
......@@ -3325,9 +3326,10 @@ fold (expr)
}
else
{
tree testtype = TREE_TYPE (arg0);
test = arg0;
true_value = integer_one_node;
false_value = integer_zero_node;
true_value = convert (testtype, integer_one_node);
false_value = convert (testtype, integer_zero_node);
}
if (TREE_CODE (arg1) != SAVE_EXPR
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment