Good morning, everyone,
I have several implied DO LOOPs in my program. All of them work, except for those where SUM is used, for example:
! Reshape is used, because implied DO LOOP returns 1D-array
array=reshape([((sum(arrin(jcoun,kcoun,:),jcoun=1,ndima),kcoun=1,ndima)],shape(array))
It compiles without error, but at runtime an access violation occurs.
Whereas this works just fine:
DO kcoun=1,ndima
DO jcoun=1,ndima
array(jcoun,kcoun)=sum(arrin(jcoun,kcoun,:))
END DO
END DO
Any ideas as to why that is would be greatly appreciated!