Hello Paul, i need your help. Below i have embedded a little program, which demonstrates that something going wrong with the Salford Compiler V7.20.
program strange_bug
implicit none
integer, dimension(3) :: array = (/ 2, 1, 3 /)
integer sum1, sum2, sum3, sum4, sum5, sum6 ! SALFORD ! INTEL 14/4/2016
sum1=-1; sum2=-1; sum3=-1; sum4=-1; sum5=-1; sum6=-1 ! ------------------------
sum1 = sum(array(:), mask = array .ne. 1 ) ! sum1 = 5 sum1 = 5
sum2 = sum(array(:), mask = array /= 1 ) ! sum2 = 5 sum2 = 5
sum3 = sum(array(:), mask = array(2) .ne. 1 ) ! sum3 = 1 sum3 = 0
sum4 = sum(array(:), mask = array(2) /= 1 ) ! sum4 = 3 sum4 = 0
sum5 = sum(array(:), mask = array(3) .ne. 1 ) ! sum5 = 2 sum5 = 6
sum6 = sum(array(:), mask = array(3) /= 1 ) ! sum6 = 3 sum6 = 6
write(*,*) sum1, sum2, sum3, sum4, sum5, sum6
end program strange_bug
The results obtained using the Intel compiler seems to be OK. But the Salford results are very strange. Especially the differences between sum3 and sum4 and between sum5 and sum6