This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Partial fix for PR 18048
On Oct 27, 2004, at 11:22 AM, Zdenek Dvorak wrote:
Hello,
here is the patch with the Zack's comment reflected. Bootstrapped &
regtested on x86_64.
This should also help Java code where we get:
<L1>:;
i.3 = (unsigned int) i;
if ((unsigned int) D.376 > i.3) goto <L5>; else goto <L2>;
<L2>:;
D.385 = _Jv_ThrowBadArrayIndex (i);
<L5>:;
*(&a->data[0] + (int *) i.3 * 4B) = 0;
;
i = (int) (i.3 + 1);
D.376 = a->length;
if (i >= D.376) goto <L8>; else goto <L1>;
<L8>:;
But the real question is why is &a->data[0] not pulled out of the loop
in the first place.
-- Pinski