https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90539
--- Comment #3 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
I think I have an idea what might be the problem.
Does the code do something like
call foo(a)
...
subroutine foo(a)
real, dimension(:) :: a
call bar(a,size(n))
...
subroutine bar(a,n)
real, dimension(n) :: a
?
What might be missing for good performance is the
check for contiguous memory when calling bar.
