------- Comment #2 from rguenth at gcc dot gnu dot org  2010-04-13 11:20 -------
Well.  There is

  pretmp.2458_440 = c[2]{lb: 0 sz: 8};
...
  c[2] = D.84046_29;

in a possibly dead code region dominated by

  if (pretmp.2460_55 > 16)
    goto <bb 54>;
  else
    goto <bb 57>;

where pretmp.2460_55 is (unsigned int)mode_size[mode_10(D)].  Thus,
the loop is peeled completely.

As we have

      gcc_assert (j <= 2 * HOST_BITS_PER_WIDE_INT);

      if (ch)
        ch = (unsigned char) str[i];
      c[j / HOST_BITS_PER_WIDE_INT] |= ch << (j % HOST_BITS_PER_WIDE_INT);

you can see that for j == 2 * HOST_BITS_PER_WIDE_INT we end up
accessing c[2].  In fact the assert looks wrong just for that reason.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43737

Reply via email to