Program rtc_pdt_arg Implicit None Type t(k) Integer,Len :: k Real c(k) End Type Type(t(7)) :: x x%c = 0 Call sub1(x) Call sub2(x,7) Call sub2(x,999) Contains Subroutine sub1(y) Type(t(*)) y Print *,'Y%K =',y%k If (Any(y%c/=0)) Stop 'FAIL value' End Subroutine Subroutine sub2(z,n) Integer,Intent(In) :: n Type(t(n)) :: z Print *,'Z%K =',z%k If (n/=z%k) Then Print *,'Z declared as TYPE(T(N)), but with N =',n,', Z%K =',z%k Stop 'FAIL z%k/=n' End If If (n/=7) Stop 'FAIL Actual arg has X%K = 7' If (Any(z%c/=0)) Stop 'FAIL value' End Subroutine End Program