(store_constructor): Handle non-zero array lower bound.
authorRichard Kenner <kenner@gcc.gnu.org>
Wed, 20 Oct 1993 21:39:45 +0000 (17:39 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Wed, 20 Oct 1993 21:39:45 +0000 (17:39 -0400)
From-SVN: r5835

gcc/expr.c

index 59ee991a5a68ad1300c0a825566bf65c57eb2578..6c54d65689a8f37b2da409acc58daa55556c8abb 100644 (file)
@@ -2894,7 +2894,7 @@ store_constructor (exp, target)
          else
            {
              if (index != 0)
-               bitpos = (TREE_INT_CST_LOW (index)
+               bitpos = ((TREE_INT_CST_LOW (index) - minelt)
                          * TREE_INT_CST_LOW (TYPE_SIZE (elttype)));
              else
                bitpos = (i * TREE_INT_CST_LOW (TYPE_SIZE (elttype)));