The following code returns an error when compiled:
--- module.f90 ---
INTEGER, ALLOCATABLE :: a(:)
--- main.f90 ---
TYPE(CTest) :: t
IF (ALLOCATED(t%a)) STOP
The error returned is:
Error: The ARRAY argument of the ALLOCATED inquiry intrinsic function shall be an allocatable array. [ALLOCATED]
Interestingly, I can use the ALLOCATE() command successfully. Only the ALLOCATED() call fails.
If you declare the type within main.f90, it seems to work. It only fails with externally declared types.