Hi Jose,

Proposed patch to PRs 52351, 85868 Wrong array section bounds when passing to an intent-in pointer dummy.

First, thanks for working on this and for this patch.

Regarding the patch, there are a few style issues which I fixed
for the commit.  If you could try to adhere to a few more of them,
I'd be obliged :-)

Regarding the ChangeLog: That format is rather rigid, see
https://gcc.gnu.org/codingconventions.html#ChangeLogs . Also,
a script run on the server checks all the ChangeLogs for correct
formats.  I usually get this right on my second or third attempt :-)

Regarding the patch itself: There were a few whitespace issues that
could be corrected easily (git diff shows them up bright red).

Reviewed, regression-tested and committed as
r11-1230-g2ff0f48819c8a7ed5d7c03e2bfc02e5907e2ff1a .

Thanks a lot for fixing this!

Regards

        Thomas

Here is the ChangeLog of what I committed:

Wrong array section bounds when passing to an intent-in pointer dummy.

Add code to allow for the creation a new descriptor for array
sections with the correct one based indexing.

Rework the generated descriptors indexing (hopefully) fixing the
wrong offsets generated.

gcc/fortran/ChangeLog:

2020-06-11  José Rui Faustino de Sousa  <jrfso...@gmail.com>

        PR fortran/52351
        PR fortran/85868
        * trans-array.c (gfc_conv_expr_descriptor): Enable the
        creation of a new descriptor with the correct one based
        indexing for array sections.  Rework array descriptor
        indexing offset calculation.

gcc/testsuite/ChangeLog:

2020-06-11  José Rui Faustino de Sousa  <jrfso...@gmail.com>

        PR fortran/52351
        PR fortran/85868
        * gfortran.dg/coarray_lib_comm_1.f90: Adjust match test for
        the newly generated descriptor.
        * gfortran.dg/PR85868A.f90: New test.
        * gfortran.dg/PR85868B.f90: New test.

Reply via email to