write(*,*) "lentype = 1, ", lenarg, "subpackets"is one of the culprits. including it gives 977 (correct), commenting it out gives 802
write(*,*)gives the correct answer but its suddenly wrong when its removed.
gfortrangives me 977 and
ifortgives me a wrong answer on the same code and input