The kernel that is miscompiled is in shape20h.f and it looks like this: do i=1,3 do j=1,3 xs(i,j)=0.d0 do k=1,20 xs(i,j)=xs(i,j)+xl(i,k)*shp(j,k) enddo enddo enddo
There is an interchange of the j and k loops that is applied to the kernel. The statement induction variable order is interchanged for scat_5 and scat_3, as in S5(scat_1,scat_5,scat_3). The code generated by CLooG looks like this: for (scat_1=0;scat_1<=2;scat_1++) { S3(scat_1) ; for (scat_3=0;scat_3<=1;scat_3++) { S4(scat_1,scat_3) ; for (scat_5=0;scat_5<=2;scat_5++) { S5(scat_1,scat_5,scat_3) ; S6(scat_1,scat_5,scat_3) ; } S7(scat_1,scat_3) ; S26(scat_1,scat_3) ; S8(scat_1,scat_3) ; } S4(scat_1,2) ; for (scat_5=0;scat_5<=2;scat_5++) { S5(scat_1,scat_5,2) ; S6(scat_1,scat_5,2) ; } S7(scat_1,2) ; S26(scat_1,2) ; for (scat_3=3;scat_3<=18;scat_3++) { for (scat_5=0;scat_5<=2;scat_5++) { S5(scat_1,scat_5,scat_3) ; S6(scat_1,scat_5,scat_3) ; } } for (scat_5=0;scat_5<=2;scat_5++) { S5(scat_1,scat_5,19) ; } } -- Summary: graphite miscompiles 454.calculix of the SPEC 2k6 Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: spop at gcc dot gnu dot org ReportedBy: spop at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41811