My short code fails under version 5.1-6 when I use the -fastsse compiler option (actually, just -Munroll -scalarsse seems to cause the behavior), but the code works fine using any other compiler options I tried and under version 5.2-4 and version 6.2-5. So I think it’s a compiler bug but I just want to be sure. Is there a way to verify this?
The code looks like this:
implicit none real*8 :: cof(10,2) real*8 :: t1,t2,t3,t4,ti,ts,tl,tp,hs,css,ss continue open(13,FILE='array') read(13,*)cof(:,1) close(13) tp = 2.5d4 t1 = tp t2 = t1*t1 t3 = t2*t1 t4 = t3*t1 ti = 1.0d0/t1 ts = ti*ti tl = log(t1) hs = cof(3,1) + cof(2,1)*ti*tl & - cof(1,1)*ts + 0.5*cof(4,1)*t1 & + (1.0d0/3.0d0)*cof(5,1)*t2 + 0.25*cof(6,1)*t3 & + 0.2*cof(7,1)*t4 + cof(9,1)*ti - 1.0d0 css = cof(1,1)*ts + cof(2,1)*ti & + cof(3,1) + cof(4,1)*t1 + cof(5,1)*t2 & + cof(6,1)*t3 + cof(7,1)*t4 ss = cof(3,1)*tl - cof(2,1)*ti - 0.5*cof(1,1)*ts & + cof(4,1)*t1 + 0.5*cof(5,1)*t2 & + (1.0d0/3.0d0)*cof(6,1)*t3 + 0.25*cof(7,1)*t4 + cof(10,1) cof(3,2) = css cof(9,2) = (hs + 1.0d0 - cof(3,2))*tp cof(10,2) = ss - cof(3,2)*log(tp) write(*,*)cof(:,:)
… and the data file that is needed looks like this
-9.95126508D+08 6.45888726D+05 -1.67589470D+02 2.31993336D-02 -1.72108091D-06 6.53193846D-11 -9.74014773D-16 0.00000000D+00 -5.07830034D+06 1.46529848D+03
When the code works, cof(10,2) is about 19, when it fails it is 6.7e+20.