https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99266
Bug ID: 99266
Summary: CLASS array/dimension handling does not work - when
DIMENSION comes in an extra line
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, rejects-valid
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: burnus at gcc dot gnu.org
Target Milestone: ---
Found when looking at PR99254 & PR99138.
For 's2':
f951: internal compiler error: find_array_spec(): Missing spec
For 's1':
Error: The SELECT RANK selector at (1) must be an assumed rank variable
implicit none (type, external)
integer :: a(5)
call s1(a)
call s2(a)
contains
!subroutine s1(x)
! class(*) :: x
! dimension :: x(..)
! select rank (y=>x)
! rank (1)
! ! OK
! rank(*)
! stop 1
! end select
!end
subroutine s2(x)
class(*) :: x
dimension :: x(:)
select type (y=>x)
type is (integer)
x(1) = 5
class default
stop 1
end select
end
end