From a86907b25ec3125480871e316dcc62c6bcb481ca Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Sun, 18 May 2008 16:34:39 +0000 Subject: [PATCH] tree-cfg.c (verify_gimple_expr): Allow conversions from pointers to sizetype and vice versa. 2008-05-18 Richard Guenther * tree-cfg.c (verify_gimple_expr): Allow conversions from pointers to sizetype and vice versa. From-SVN: r135504 --- gcc/ChangeLog | 5 +++++ gcc/tree-cfg.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 890477b..0e398e3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2008-05-18 Richard Guenther + + * tree-cfg.c (verify_gimple_expr): Allow conversions from + pointers to sizetype and vice versa. + 2008-05-18 Uros Bizjak * config/i386/i386.c (ix86_secondary_reload): New static function. diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 4eab1fd..c0cb7b8 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -3658,7 +3658,10 @@ verify_gimple_expr (tree expr) 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))) + && (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. */ -- 2.7.4