https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103367
--- Comment #25 from Harald Anlauf <anlauf at gcc dot gnu.org> ---
(In reply to Jerry DeLisle from comment #24)
> Created attachment 64941 [details]
> Followup fixup patch to plug some holes.
>
> This small patch tweaks some of the logic so the invalids dont make it
> through. Harald, if you have time, please exercise this. I will prepare it
> for submission as I can.
I tested this a little and it did not look bad so far.
We still fail on code like:
program p
type t
integer :: a(1,2) = 3
end type
type(t), parameter :: x(1) = t(4)
! integer, parameter :: y(*) = x(1)%a(1,:) ! ICE
integer, parameter :: y(2) = x(1)%a(1,:) ! ICE
print *, y
end