diff options
author | Jakub Jelinek <jakub@redhat.com> | 2015-04-07 16:34:06 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2015-04-07 16:34:06 +0200 |
commit | dcc72b9e73852d9e3b5f40c6dc51da12c444d699 (patch) | |
tree | f42a807458e5c2d2ddd09d1038d0bf44d207f68c /gcc/expr.c | |
parent | 440f9408ea950a29ef7606b6114d84d1a5b53c90 (diff) | |
download | gcc-dcc72b9e73852d9e3b5f40c6dc51da12c444d699.zip gcc-dcc72b9e73852d9e3b5f40c6dc51da12c444d699.tar.gz gcc-dcc72b9e73852d9e3b5f40c6dc51da12c444d699.tar.bz2 |
re PR middle-end/65680 (ICE at -O1 and above on x86_64-linux-gnu in expand_assignment, at expr.c:4830)
PR middle-end/65680
* expr.c (get_inner_reference): Handle bit_offset that doesn't fit
into signed HOST_WIDE_INT the same as negative bit_offset.
* gcc.c-torture/compile/pr65680.c: New test.
From-SVN: r221899
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -6941,7 +6941,7 @@ get_inner_reference (tree exp, HOST_WIDE_INT *pbitsize, if (offset) { /* Avoid returning a negative bitpos as this may wreak havoc later. */ - if (wi::neg_p (bit_offset)) + if (wi::neg_p (bit_offset) || !wi::fits_shwi_p (bit_offset)) { offset_int mask = wi::mask <offset_int> (LOG2_BITS_PER_UNIT, false); offset_int tem = bit_offset.and_not (mask); |