https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91512
--- Comment #11 from rguenther at suse dot de <rguenther at suse dot de> --- On Thu, 22 Aug 2019, tkoenig at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91512 > > --- Comment #10 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- > > > Yes, but in the WRF file I see no assumed-shape arrays but all > > appear to be of dimension(low:high,...) style. > > One or two dimensional? Two or three dimensional. I didn't review all callees and arguments but there seems to be a 1:1 match, so both callers and callees have matching argument specifications dimension(ims:ime,jms:jme). OTOH "matching" is probably known only losely because those ims,ime,jms and jme are arguments to both caller and callee and passed on from caller to callee. Not sure if the FE knows they are not modified, but then still no repacking should be required? > Code like > > subroutine foo(a) > real, intent(in), dimension(*) :: a > end subroutine foo > > real, dimension(n,m) :: a > call foo(a(low:high,low2,high2)) > > will also trigger a repack, because foo expects > a contiguous memory argument. > > Code like > > real, dimension(10) :: a > call foo(a(from:to)) > > should not repack, because the memory is contiguous. > >