[patch, fortran] Fix contiguous dummy arguments

Thomas Koenig tkoenig@netcologne.de
Sat Jan 19 15:05:00 GMT 2019


Hello world,

the attached patch fixes handling of contiguous dummy arguments when
the actual arguments are not contiguous.

The patch to trans-expr.c itself was written by Paul and attached to
the PR. I just added the test case.  Regression-testing revealed some
failing scan-tree tests due to different code being generated. I put
corresponding run time tests into the new test case to make sure that no
wrong code is being generated.

I have also tested the new test case and the compiler with valgrind.

OK for trunk?

Regards

	Thomas

2018-01-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
         Paul Thomas  <pault@gcc.gnu.org>

         PR fortran/56789
         * trans-expr.c (gfc_conv_procedure_call): Call
         gfc_conv_subref_array_arg if the formal arg is contiguous
         and the actual arg may not be.

2018-01-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
         Paul Thomas  <pault@gcc.gnu.org>

         PR fortran/56789
         * gfortran.dg/contiguous_3.f90: Make code compilant.  Remove
         scan-tree tests that fail with patch.
         * gfortran.dg/contiguous_8.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p2.diff
Type: text/x-patch
Size: 1502 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20190119/ca5f27c3/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: contiguous_8.f90
Type: text/x-fortran
Size: 1751 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20190119/ca5f27c3/attachment-0001.bin>


More information about the Fortran mailing list