diff options
author | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-10-09 04:55:17 +0000 |
---|---|---|
committer | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-10-09 04:55:17 +0000 |
commit | 17b316d9df91377796f9155ec47e598de5d7b1b5 (patch) | |
tree | b1130548d726186de61d51a423ae0d35db5ed8eb /gcc/tree-sra.c | |
parent | 83ec5f8c55caffe533f80332a8669e59fa7e686e (diff) | |
download | gcc-17b316d9df91377796f9155ec47e598de5d7b1b5.tar.gz |
PR tree-optimization/33655
PR middle-end/22156
* tree-sra.c (bitfield_overlaps_p): When fld->element is INTEGER_CST,
convert it to bitsizetype before size_binop call.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129152 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r-- | gcc/tree-sra.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index f8b4470562e..21da0c0a298 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -2906,7 +2906,8 @@ bitfield_overlaps_p (tree blen, tree bpos, struct sra_elt *fld, else if (TREE_CODE (fld->element) == INTEGER_CST) { flen = fold_convert (bitsizetype, TYPE_SIZE (fld->type)); - fpos = size_binop (MULT_EXPR, flen, fld->element); + fpos = fold_convert (bitsizetype, fld->element); + fpos = size_binop (MULT_EXPR, flen, fpos); } else gcc_unreachable (); |