From 8df9c702e68f7d493e39883145e03f947ce6e437 Mon Sep 17 00:00:00 2001 From: James E Wilson Date: Tue, 9 Oct 2007 04:55:17 +0000 Subject: 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 --- gcc/ChangeLog | 7 +++++++ gcc/tree-sra.c | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'gcc') 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 + + 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 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 (); -- cgit v1.1