To avoid data type conflicts, the type of np is directly uses:
integer, parameter :: ip = kind(np)
integer(kind=ip) pos1,pos2, length
But I am using statements like
pos1 = np(111) + tpo
where tpo is defined as ordinary integer. So far I know, this should be casted to into the np-type.
Futhermore, everything also is working fine on windows, if I replace the slice-form by loops. in that case the same pointers (pos1, etc.) are used.
I still do not understand this issue.