+2019-10-30 Martin Liska <mliska@suse.cz>
+
+ * fold-const.c (operand_equal_p): Support OBJ_TYPE_REF.
+ * tree.c (add_expr): Hash parts of OBJ_TYPE_REF.
+
2019-10-30 Martin Liska <mliska@suse.cz>
PR lto/91393
flags &= ~OEP_ADDRESS_OF;
return OP_SAME (1) && OP_SAME (2);
+ /* Virtual table call. */
+ case OBJ_TYPE_REF:
+ {
+ if (!operand_equal_p (OBJ_TYPE_REF_EXPR (arg0),
+ OBJ_TYPE_REF_EXPR (arg1), flags))
+ return false;
+ if (tree_to_uhwi (OBJ_TYPE_REF_TOKEN (arg0))
+ != tree_to_uhwi (OBJ_TYPE_REF_TOKEN (arg1)))
+ return false;
+ if (!operand_equal_p (OBJ_TYPE_REF_OBJECT (arg0),
+ OBJ_TYPE_REF_OBJECT (arg1), flags))
+ return false;
+ if (!types_same_for_odr (obj_type_ref_class (arg0),
+ obj_type_ref_class (arg1)))
+ return false;
+ return true;
+ }
+
default:
return false;
}
inchash::add_expr (TARGET_EXPR_SLOT (t), hstate, flags);
return;
+ /* Virtual table call. */
+ case OBJ_TYPE_REF:
+ inchash::add_expr (OBJ_TYPE_REF_EXPR (t), hstate, flags);
+ inchash::add_expr (OBJ_TYPE_REF_TOKEN (t), hstate, flags);
+ inchash::add_expr (OBJ_TYPE_REF_OBJECT (t), hstate, flags);
+ return;
default:
break;
}