https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77517
--- Comment #2 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- For completeness, older versions below 5 give : $ gfortran-4.9 z1.f90 z1.f90:3.20: call move_alloc (a, b) 1 Error: 'from' argument of 'move_alloc' intrinsic at (1) must be the same type and kind as 'to' $ gfortran-4.9 z2.f90 z2.f90:1.9: program p 1 Internal Error at (1): Invalid expression in gfc_element_size. $ gfortran-4.8 z2.f90 z2.f90: In function 'p': z2.f90:1:0: internal compiler error: in gfc_typenode_for_spec, at fortran/trans-types.c:1136 program p ^ Please submit a full bug report, with preprocessed source if appropriate. --- Backup, now silently accepted : program p class(*), allocatable :: a, b contains subroutine b end end program p class(*), allocatable :: a, b contains subroutine a end end program p class(*), allocatable :: a, b contains function b() end end program p class(*), allocatable :: a, b contains function a() end end