The following reproducer exposes an inefficiency with string comparisons. The compiler generates a call to for_cpstr() that consumes substantial compute time for a case I have. Tried with versions 11.1 and 13.1 and get the same assembly code. What is that call good for ? The compiler should be able to do much better with such a simple piece of code.
subroutine scmp(a,b,l, flag)
character(*), intent(in) :: a
character(*), intent(in) :: b
integer, intent(in) :: l
logical, intent(out) :: flag
if (a(1:l) == b(1:l)) then
flag = .true.
else
flag = .false.
end if
end subroutine scmp