https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84922
--- Comment #15 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- When compiling the following variant module copy use, intrinsic :: iso_fortran_env, only : int8 interface module subroutine copy_byte_data( data, copy ) ! Chase's copier integer(int8), intent(in) :: data(:) integer(int8), allocatable, intent(out) :: copy(:) end subroutine copy_byte_data end interface contains module subroutine copy_byte_data( data, copy ) ! Chase's copier integer(int8), intent(in) :: data(:) integer(int8), allocatable, intent(out) :: copy(:) if ( allocated( copy ) ) then deallocate( copy ) end if allocate( copy( size(data) ) ) copy = data return end subroutine copy_byte_data end module copy program test_copy use copy integer(int8) :: data(8) = 0_int8 integer(int8), allocatable :: acopy(:) write(*,*) 'DATA = ', data call copy_byte_data( data, acopy) write(*, *) 'ACOPY = ', acopy stop end program test_copy with revision 258784 I get pr84922_db_2.f90:20:42: module subroutine copy_byte_data( data, copy ) ! Chase's copier 1 Error: Shape mismatch in argument 'data' at (1) pr84922_db_2.f90:38:8: use copy 1 Fatal Error: Can't open module file 'copy.mod' for reading at (1): No such file or directory compilation terminated. Is the variant of module copy valid? If no, it is not detected; if yes, the Error: Shape mismatch in argument 'data' seems bogus.