diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-04-11 15:50:57 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-04-11 15:50:57 +0000 |
commit | 22eb330236ed8b666b82a8389421728fdf1b8d47 (patch) | |
tree | 74c24d546e7e1f8da54b8ac8e895851103d4fa2e /gcc/gimplify.c | |
parent | bee1af9546f5e2bc4d8900aace58286f7c217fe8 (diff) | |
download | gcc-22eb330236ed8b666b82a8389421728fdf1b8d47.tar.gz |
2011-04-11 Richard Guenther <rguenther@suse.de>
* gimplify.c (gimple_fold_indirect_ref): Check host_integerp
before calling tree_low_cst.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172263 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 598fe9cfb97..9afd4ff27fe 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -4079,9 +4079,10 @@ gimple_fold_indirect_ref (tree t) /* ((foo*)&vectorfoo)[1] -> BIT_FIELD_REF<vectorfoo,...> */ if (TREE_CODE (addr) == ADDR_EXPR && TREE_CODE (TREE_TYPE (addrtype)) == VECTOR_TYPE - && useless_type_conversion_p (type, TREE_TYPE (TREE_TYPE (addrtype)))) + && useless_type_conversion_p (type, TREE_TYPE (TREE_TYPE (addrtype))) + && host_integerp (off, 1)) { - HOST_WIDE_INT offset = tree_low_cst (off, 0); + unsigned HOST_WIDE_INT offset = tree_low_cst (off, 1); tree part_width = TYPE_SIZE (type); unsigned HOST_WIDE_INT part_widthi = tree_low_cst (part_width, 0) / BITS_PER_UNIT; |