Hi folks.
In this PR the problem is that a call to fold_build2_loc() returns one
of the original arguments unchanged. In the code below we take this
result and change its location before returning it.
tem = fold_build2_loc (loc, code, type,
fold_convert_loc (loc, TREE_TYPE (op0),
TREE_OPERAND (arg0, 1)), op1);
protected_set_expr_location (tem, loc);
When --enable-checking=fold, fold verifies that none of the arguments
changed, which in this case it obviously does.
Would be ok to allow a TREE_EXP's location to change within fold? That is,
add locus (for TREE_EXP's) to the list of allowed changeable fields in
fold_checksum_tree()?
Aldy