http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59414
--- Comment #5 from Antony Lewis <antony at cosmologist dot info> --- Thanks for the quick fix! The sourced allocate errors crop up in various places in the full code, and already seem to be known in several bug reports, e.g. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44672 For example in this case you just get a compiler error: module test Type InterpGrid2D REAL, pointer :: z(:,:) => NULL() contains procedure :: Init => InterpGrid2D_Init end Type InterpGrid2D contains subroutine InterpGrid2D_Init(W, z) class(InterpGrid2D):: W REAL, INTENT(IN), pointer :: z(:,:) allocate(W%z, source = z) end subroutine InterpGrid2D_Init end module