The type of "[lo:hi:str]" is being forced to INTEGER(8), ignoring the types of the operands to the triplet. The type of a triplet should be whatever the type of "lo+hi+str" would be. (Array constructor triplets are a syntactic sugar extension for an implied DO loop.)