------- Comment #5 from rguenth at gcc dot gnu dot org 2009-04-24 15:00 -------
<bb 2>:
# VUSE <.MEMD.1098_46(D)>
D.254_7 = mmD.199;
#ref#1#5D.258_8 = D.254_7;
# D.270_1 = PHI <0(2), D.270_40(6)>
# D.260_2 = PHI <0(2), D.260_42(6)>
*.LJpc=1008L.0:
D.262_14 = (struct java.lang.ObjectD.33 *) #ref#1#5D.258_8;
#ref#4#9D.264_15 = D.262_14;
#ref#4#9.1D.276_16 = (struct java.lang.ObjectD.33 *) #ref#4#9D.264_15;
#ref#4#9.2D.277_17 = (struct java.lang.Object[]D.265 *) #ref#4#9.1D.276_16;
# VUSE <.MEMD.1098_46(D)>
#slot#4#10D.269_18 = #ref#4#9.2D.277_17->lengthD.266;
if (D.260_2 >= #slot#4#10D.269_18)
goto <bb 7> (*.LJpc=1026);
else
goto <bb 4>;
<bb 4>:
D.271_22 = D.262_14;
#ref#4#9D.264_23 = D.271_22;
#ref#4#9.3D.279_26 = D.254_7;
D.280_27 = &#ref#4#9.3D.279_26->dataD.195;
#slot#5#11.6D.286_30 = (unsigned intD.6) D.260_2;
# VUSE <.MEMD.1098_46(D)>
D.287_31 = #ref#4#9.3D.279_26->lengthD.194;
The issue is that both accesses to lenght, while based off the same pointer
in the end are done via dereferences of different types. The first
one, #ref#4#9.2D.277_17 is of type struct java.lang.Object[]D.265 *
while the second one, #ref#4#9.3D.279_26, is of type struct int[]D.193 *.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39885