diff options
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/tree-sra.c | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d275fbb..03230d1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2007-10-09 James E. Wilson <wilson@specifix.com> + + 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. + 2007-10-09 Alexandre Oliva <aoliva@redhat.com> PR tree-optimization/33572 diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index f8b4470..21da0c0 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 (); |