This is based on a message sent to the Computation Chemistry list by Prof. Christoph van Wullen (the Dec. 16 posts aren't archived at ccl.net yet). Namely, it seems like the index() intrinsic function is broken. Here is some sample code:
character(len=48), dimension(2) :: str
integer :: i
str(1)=" 1. this is some junk"
str(2)=" 2. here is the target"
write (6,*) index(str(i), ' the')
end program test
ifort returns 61 and 13. The latter is ok, but the former is obviously wrong. By comparison, this code on DEC/Compaq/HP Fortran gives 0 and 13 which seems correct.
Is there a solution to this? Much of the code I have uses index().