I believe this program should produce an error and it does not
program testit
implicit none
character(len=:),allocatable :: s(:)
integer,allocatable :: i(:)
real,allocatable :: r(:)
allocate(character(len=20) :: s(10), i(10), r(10))
write(,)size(i),size(r),size(s),len(s)
end program testit
The standard states
C934 (R927) If type-spec appears, it shall specify a type with which each allocate-object is type compatible.