Backported from mainline
2015-04-07 Jakub Jelinek <jakub@redhat.com>
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: r224104
2015-06-03 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
+ 2015-04-07 Jakub Jelinek <jakub@redhat.com>
+
+ 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.
+
2015-03-10 Jakub Jelinek <jakub@redhat.com>
PR target/65368
if (offset)
{
/* Avoid returning a negative bitpos as this may wreak havoc later. */
- if (bit_offset.is_negative ())
+ if (bit_offset.is_negative () || !bit_offset.fits_shwi ())
{
double_int mask
= double_int::mask (BITS_PER_UNIT == 8
2015-06-03 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
+ 2015-04-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/65680
+ * gcc.c-torture/compile/pr65680.c: New test.
+
2015-03-10 Jakub Jelinek <jakub@redhat.com>
PR target/65368
--- /dev/null
+/* PR middle-end/65680 */
+/* { dg-do compile { target lp64 } } */
+
+struct S
+{
+ int f : 1;
+} a[100000000000000001][3];
+
+void
+foo (void)
+{
+ struct S b = { 0 };
+ a[100000000000000000][0] = b;
+}
+
+void
+bar (void)
+{
+ a[100000000000000000][0].f = 1;
+}