[PATCH] Fix m32c
Richard Guenther
rguenther@suse.de
Sun May 18 16:43:00 GMT 2008
This fixes m32c by allowing conversions from pointers to sizetype
and vice versa.
Bootstrapped and tested on x86_64-unknown-linux-gnu. DJ tested this
on m32c.
Applied to trunk.
Richard.
2008-05-18 Richard Guenther <rguenther@suse.de>
* tree-cfg.c (verify_gimple_expr): Allow conversions from
pointers to sizetype and vice versa.
Index: gcc/tree-cfg.c
===================================================================
*** gcc/tree-cfg.c (revision 135494)
--- gcc/tree-cfg.c (working copy)
*************** verify_gimple_expr (tree expr)
*** 3658,3664 ****
there is no sign or zero extension involved. */
if (((POINTER_TYPE_P (type) && INTEGRAL_TYPE_P (TREE_TYPE (op)))
|| (POINTER_TYPE_P (TREE_TYPE (op)) && INTEGRAL_TYPE_P (type)))
! && TYPE_PRECISION (type) == TYPE_PRECISION (TREE_TYPE (op)))
return false;
/* Allow conversion from integer to offset type and vice versa. */
--- 3658,3667 ----
there is no sign or zero extension involved. */
if (((POINTER_TYPE_P (type) && INTEGRAL_TYPE_P (TREE_TYPE (op)))
|| (POINTER_TYPE_P (TREE_TYPE (op)) && INTEGRAL_TYPE_P (type)))
! && (TYPE_PRECISION (type) == TYPE_PRECISION (TREE_TYPE (op))
! /* For targets were the precision of sizetype doesn't
! match that of pointers we need the following. */
! || type == sizetype || TREE_TYPE (op) == sizetype))
return false;
/* Allow conversion from integer to offset type and vice versa. */
More information about the Gcc-patches
mailing list