Hi Harald, It might be a simple patch but I have to confess it took a while for me to get my head around the difference between gfc_is_not_contiguous and !gfc_is_simply_contigous :-( Yes, this is OK for mainline and, after a short delay, for 13-branch. Thanks for the patch Paul On Sat, 16 Dec 2023 at 18:28, Harald Anlauf wrote: > Dear all, > > the attached simple patch fixes a (9+) regression for passing > to a CONTIGUOUS,TARGET dummy an *effective argument* that is > contiguous, although the actual argument is not simply-contiguous > (it is a pointer without the CONTIGOUS attribute in the PR). > > Since a previous attempt for a patch lead to regressions in > gfortran.dg/bind-c-contiguous-3.f90, which is rather dense, > I decided to enhance the current testcase with various > combinations of actual and dummy arguments that allow to > study whether a _gfortran_internal_pack is generated in > places where we want to. (_gfortran_internal_pack does not > create a temporary when no packing is needed). > > Regtested on x86_64-pc-linux-gnu. OK for mainline? > > I would like to backport this - after a grace period - to > at least 13-branch. Any objections here? > > Thanks, > Harald > >