https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123899
--- Comment #4 from Neil Carlson <neil.n.carlson at gmail dot com> ---
Here's an obviously related error regarding rank, which should be fixed at the
same time.
The rank intrinsic returns the correct result but select-rank jumps to the
wrong stanza.
integer array(0)
call sub([integer::])
contains
subroutine sub(x)
integer x(..)
if (rank(x) /= 1) stop 1
select rank (x)
rank (1)
! should select here
rank default
stop 2
end select
end subroutine
end
./a.out
STOP 2