https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64209
--- Comment #6 from janus at gcc dot gnu.org ---
Here is a reduced test case for the remaining segfault:
PROGRAM main
IMPLICIT NONE
INTEGER :: copy_x(3)
CALL copy(1,copy_x)
PRINT *, copy_x
CONTAINS
SUBROUTINE copy(x,a)
integer, INTENT(IN) :: x
CLASS(*), INTENT(OUT) :: a(:)
SELECT TYPE(a); TYPE IS(integer)
a(:) = x
END SELECT
END SUBROUTINE
END PROGRAM
It's a very similar scheme as in comment #2, only this time we have an
array-valued CLASS(*), INTENT(OUT) argument.
I think the problem is with _def_init being NULL again. For the array case here
the dump shown a line like:
a->_vptr->_copy (a->_vptr->_def_init, &a->_data);
Again we need a conditional check for _def_init being non-NULL.