diff options
author | James E Wilson <wilson@specifixinc.com> | 2007-10-09 04:55:17 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2007-10-09 04:55:17 +0000 |
commit | 8df9c702e68f7d493e39883145e03f947ce6e437 (patch) | |
tree | b1130548d726186de61d51a423ae0d35db5ed8eb | |
parent | 1e4cc5399f5eac720b03a5e19bbef6d0efae8e5d (diff) | |
download | gcc-8df9c702e68f7d493e39883145e03f947ce6e437.zip gcc-8df9c702e68f7d493e39883145e03f947ce6e437.tar.gz gcc-8df9c702e68f7d493e39883145e03f947ce6e437.tar.bz2 |
re PR tree-optimization/33655 (ICE in bitfield_overlaps_p, at tree-sra.c:2901)
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.
From-SVN: r129152
-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 (); |