Hi!

I forgot to decrement the counter, but given that nobody has hit it
until now it is possible that no frontend leaves RANGE_EXPR indexes in
CONSTRUCTORs around till late.  varasm.c seems to handle them though,
so fixed thusly, committed to trunk as obvious.

2011-06-06  Jakub Jelinek  <ja...@redhat.com>

        PR debug/49262
        * dwarf2out.c (native_encode_initializer): Decrement count in each
        iteration.

--- gcc/dwarf2out.c.jj  2011-06-06 10:30:05.000000000 +0200
+++ gcc/dwarf2out.c     2011-06-06 18:02:28.000000000 +0200
@@ -18065,7 +18065,7 @@ native_encode_initializer (tree init, un
                {
                  int count = tree_low_cst (TREE_OPERAND (index, 1), 0)
                              - tree_low_cst (TREE_OPERAND (index, 0), 0);
-                 while (count > 0)
+                 while (count-- > 0)
                    {
                      if (val)
                        memcpy (array + curpos, array + pos, fieldsize);

        Jakub

Reply via email to