https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72832
--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- For the record, the following test program allocate_source type :: t end type t type, extends(t) :: tt end type tt type(t), allocatable, dimension(:) :: a, b allocate(a(1:2)) write(*,*) size(a,1) allocate(b(1:4), source=a) write(*,*) size(b,1) end program allocate_source gives the "expected" output and at runtime the error 2 At line 11 of file pr72832_db_1.f90 Fortran runtime error: Array bound mismatch for dimension 1 of array 'b' (4/2) when compiled with -fcheck=bounds.