The compiler's error message is one descriptive of the problem. With INTENT(IN)
you are saying that the object will not change, but you then go on to attempt to ALLOCATE
it.
Yes, an explicit interface will be required for the calling, but that isn't the problem.
The Fortran 2008 standard says in section 5.3.10 that
A nonpointer object with the INTENT (IN) attribute shall not appear in a variable denition context
Allocation is one such context: section 16.6.7, point (11).