fixing one of the compile time fails with the reductions patch on
416.gamess, I reduced the following testcase:
SUBROUTINE BFN(X,BF)
DIMENSION BF(13)
DIMENSION FACT(17)
DO 70 M=0,LAST
XF = 1
IF(M.NE.0) XF = FACT(M)
Y = Y + XF
70 CONTINUE
BF(1)=Y
END
The problem is linked to the fact that the condition IF(M.NE.0) is
always true in the loop in which the first iteration has been peeled
out before the loop. So we always assign XF = 1 before entering the
loop, and thus the statement "XF = 1" of the loop is never executed,
but still present as the condition is not removed by GCC. So we
end up with an empty domain for "XF = 1".
The attached patch avoids generating code for such statements that
have been proved to never execute. I will commit it to the branch.
Sebastian