diff options
author | Thomas Koenig <tkoenig@gcc.gnu.org> | 2019-01-19 20:06:41 +0000 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2019-01-19 20:06:41 +0000 |
commit | 8558af5023b91a65d25d2ed32d642f93e09aa28a (patch) | |
tree | 1bc72cd5e13ecbb36eac61524de60cda8d456236 /gcc/fortran/trans-expr.c | |
parent | e76c8e5612bc29569d90b3926eb761934251d97d (diff) | |
download | gcc-8558af5023b91a65d25d2ed32d642f93e09aa28a.zip gcc-8558af5023b91a65d25d2ed32d642f93e09aa28a.tar.gz gcc-8558af5023b91a65d25d2ed32d642f93e09aa28a.tar.bz2 |
re PR fortran/56789 (Handling of contiguous dummy arguments)
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.
Co-Authored-By: Paul Thomas <pault@gcc.gnu.org>
From-SVN: r268096
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r-- | gcc/fortran/trans-expr.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index b38d784..3238e7c 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -5828,6 +5828,13 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, INTENT_IN, fsym && fsym->attr.pointer); } + else if (fsym && fsym->attr.contiguous + && !gfc_is_simply_contiguous (e, false, true)) + { + gfc_conv_subref_array_arg (&parmse, e, nodesc_arg, + fsym ? fsym->attr.intent : INTENT_INOUT, + fsym && fsym->attr.pointer); + } else gfc_conv_array_parameter (&parmse, e, nodesc_arg, fsym, sym->name, NULL); |