https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49802
--- Comment #8 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- > I also confirm that compiling the test in comment #5 gives an ICE I get the same ICE with the following code call pr53876 end subroutine pr53876 IMPLICIT NONE TYPE :: individual integer :: icomp ! Add an extra component to test offset REAL, DIMENSION(:), ALLOCATABLE :: genes END TYPE CLASS(individual), DIMENSION(:), ALLOCATABLE :: indv, indv1 allocate (indv(2), source = [individual(1, [99,999]), & individual(2, [999,9999])]) ! allocate (indv1(2), source = [indv(1),indv(2)]) print *, fun([indv(1),indv(2)]) contains elemental function fun(x) result(res) integer :: res class(individual), intent(in) :: x res = x%genes(1) end END