we are frustrating with a weird problem caused by the latest Intel's compiler suites (ifort/icc v126.96.36.199, Linux x86_64/EM64T). Depending on the optimization level, the following code generates different results:
subroutine MakeWwdHlp2 (Ww,W1,dima,dimbe,dimga)
C Uncomment to get correct results/loop's counters
c print *,ga,be,a
The '-O0' as well as '-O1' optimization levels give us correct results while '-O2' doesn't. If the printing line is uncommented then results become always correct, regardless the optimization level used. The 'dimga','dima', and 'dimbe' counters are in the range [10,12]. Enclosed please find the assembler listing generated via '-00','-O1', and '-O2'.
It would be great to identify the compler's option that causes the problem.
Thank in advance!