diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-18 16:34:39 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-18 16:34:39 +0000 |
commit | 7c3ee715da8846ddee91c524c920a95e874691cf (patch) | |
tree | 70368411195a0b5b04ad6e103fa62c92da27024e | |
parent | 5cf366344b4ad4437ef336a66a298e8fa8ddc580 (diff) | |
download | ppe42-gcc-7c3ee715da8846ddee91c524c920a95e874691cf.tar.gz ppe42-gcc-7c3ee715da8846ddee91c524c920a95e874691cf.zip |
2008-05-18 Richard Guenther <rguenther@suse.de>
* tree-cfg.c (verify_gimple_expr): Allow conversions from
pointers to sizetype and vice versa.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135504 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/tree-cfg.c | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 890477b4be6..0e398e356a0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2008-05-18 Richard Guenther <rguenther@suse.de> + + * tree-cfg.c (verify_gimple_expr): Allow conversions from + pointers to sizetype and vice versa. + 2008-05-18 Uros Bizjak <ubizjak@gmail.com> * config/i386/i386.c (ix86_secondary_reload): New static function. diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 4eab1fd449e..c0cb7b87488 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. */ |