https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128812
--- Comment #1 from Mikael Morin <mikael at gcc dot gnu.org> ---
(In reply to Mikael Morin from comment #0)
> The test is invalid because of F2023 (15.5.2.6: Allocatable and pointer
> dummy variables):
And of course because of the corank mismatch, like in PR128806.
But the same crash happens with matching coranks:
program prog
implicit none
integer, parameter :: n = 5
type :: t
integer :: c
end type
class(t), allocatable :: a[:]
integer :: i
allocate(a[5:*])
a%c = 7
call sub2(a)
contains
subroutine sub2(x)
type(t), allocatable, intent(in) :: x[:]
end subroutine
end program prog