The following code below is valid and falsely rejected with the error message
exceptions.f90:19:9: error: 'array=' argument has unacceptable rank 0
i = sum (maxloc (excs%level))
^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/local/libexec/llvm-11/bin/f18: semantic errors in exceptions.f90
(v11.1.0 on Darwin Big Sur)
module exceptions
implicit none
private
public :: gather_exceptions
integer, private, parameter :: NAME_LENGTH = 64
type, public :: exception
integer :: level = 0
character(len=NAME_LENGTH) :: message = ""
character(len=NAME_LENGTH) :: origin = ""
end type exception
contains
pure subroutine gather_exceptions (exc, excs)
type(exception), intent(inout) :: exc
type(exception), dimension(:), intent(in) :: excs
integer :: i
i = sum (maxloc (excs%level))
end subroutine gather_exceptions
end module exceptions
The following code below is valid and falsely rejected with the error message exceptions.f90:19:9: error: 'array=' argument has unacceptable rank 0 i = sum (maxloc (excs%level)) ^^^^^^^^^^^^^^^^^^^^^^^^^ /opt/local/libexec/llvm-11/bin/f18: semantic errors in exceptions.f90
(v11.1.0 on Darwin Big Sur)