+2020-05-06 Richard Biener <rguenther@suse.de>
+
+ * tree-cfg.c (verify_gimple_assign_unary): Adjust integer
+ to/from pointer conversion checking.
+
2020-05-05 Michael Meissner <meissner@linux.ibm.com>
* config/rs6000/rs6000-builtin.def: Delete changes meant for a
/* Allow conversions from pointer type to integral type only if
there is no sign or zero extension involved.
For targets were the precision of ptrofftype doesn't match that
- of pointers we need to allow arbitrary conversions to ptrofftype. */
+ of pointers we allow conversions to types where
+ POINTERS_EXTEND_UNSIGNED specifies how that works. */
if ((POINTER_TYPE_P (lhs_type)
&& INTEGRAL_TYPE_P (rhs1_type))
|| (POINTER_TYPE_P (rhs1_type)
&& INTEGRAL_TYPE_P (lhs_type)
&& (TYPE_PRECISION (rhs1_type) >= TYPE_PRECISION (lhs_type)
- || ptrofftype_p (lhs_type))))
+#if defined(POINTERS_EXTEND_UNSIGNED)
+ || (TYPE_MODE (rhs1_type) == ptr_mode
+ && (TYPE_PRECISION (lhs_type)
+ == BITS_PER_WORD /* word_mode */
+ || (TYPE_PRECISION (lhs_type)
+ == GET_MODE_PRECISION (Pmode))))
+#endif
+ )))
return false;
/* Allow conversion from integral to offset type and vice versa. */