The following program attempts to increment an integer component of a derived type, but in line 14 incorrectly refers to u%j%i instead of u%t%i.
MODULE m
TYPE t1
INTEGER :: i=0
END TYPE t1
TYPE t2
INTEGER :: j=0
TYPE(t1) :: t
END TYPE t2
END MODULE m
!
PROGRAM p
USE m
TYPE(t2) :: u
PRINT *, u%j%i+1
END PROGRAM p
The compiler, appropriately, generates an error message, but seems to imply that u is integer. Is it possible for the compiler to indicate that u%j is INTEGER(KIND=3) rather than u?