2019-03-15 Jakub Jelinek <jakub@redhat.com>
+ PR c++/89709
+ * tree.c (inchash::add_expr): Strip any location wrappers.
+ * fold-const.c (operand_equal_p): Move stripping of location wrapper
+ after hash verification.
+
PR debug/89704
* dwarf2out.c (add_const_value_attribute): Return false for MINUS,
SIGN_EXTEND and ZERO_EXTEND.
int
operand_equal_p (const_tree arg0, const_tree arg1, unsigned int flags)
{
- STRIP_ANY_LOCATION_WRAPPER (arg0);
- STRIP_ANY_LOCATION_WRAPPER (arg1);
-
/* When checking, verify at the outermost operand_equal_p call that
if operand_equal_p returns non-zero then ARG0 and ARG1 has the same
hash value. */
return 0;
}
+ STRIP_ANY_LOCATION_WRAPPER (arg0);
+ STRIP_ANY_LOCATION_WRAPPER (arg1);
+
/* If either is ERROR_MARK, they aren't equal. */
if (TREE_CODE (arg0) == ERROR_MARK || TREE_CODE (arg1) == ERROR_MARK
|| TREE_TYPE (arg0) == error_mark_node