diff options
author | Thomas Koenig <tkoenig@gcc.gnu.org> | 2019-10-14 21:37:34 +0000 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2019-10-14 21:37:34 +0000 |
commit | 4a4fc7feda04b57e3bf767ba29836868f2f984d7 (patch) | |
tree | 6d64123e9c061175729c44d003015f61dc7c2829 /gcc/fortran/array.c | |
parent | b08e9f111b80e10b5ae50bcba4e3693475dbf95a (diff) | |
download | gcc-4a4fc7feda04b57e3bf767ba29836868f2f984d7.zip gcc-4a4fc7feda04b57e3bf767ba29836868f2f984d7.tar.gz gcc-4a4fc7feda04b57e3bf767ba29836868f2f984d7.tar.bz2 |
re PR fortran/92004 (Rejection of different ranks for dummy array argument where actual argument is an element)
2019-10-14 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/92004
* array.c (expand_constructor): Set from_constructor on
expression.
* gfortran.h (gfc_symbol): Add maybe_array.
(gfc_expr): Add from_constructor.
* interface.c (maybe_dummy_array_arg): New function.
(compare_parameter): If the formal argument is generated from a
call, check the conditions where an array element could be
passed to an array. Adjust error message for assumed-shape
or pointer array. Use correct language for assumed shaped arrays.
(gfc_get_formal_from_actual_arglist): Set maybe_array on the
symbol if the actual argument is an array element fulfilling
the conditions of 15.5.2.4.
2019-10-14 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/92004
* gfortran.dg/argument_checking_24.f90: New test.
* gfortran.dg/abstract_type_6.f90: Add error message.
* gfortran.dg/argument_checking_11.f90: Correct wording
in error message.
* gfortran.dg/argumeent_checking_13.f90: Likewise.
* gfortran.dg/interface_40.f90: Add error message.
From-SVN: r276972
Diffstat (limited to 'gcc/fortran/array.c')
-rw-r--r-- | gcc/fortran/array.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/fortran/array.c b/gcc/fortran/array.c index cbeece4..427110b 100644 --- a/gcc/fortran/array.c +++ b/gcc/fortran/array.c @@ -1782,6 +1782,7 @@ expand_constructor (gfc_constructor_base base) gfc_free_expr (e); return false; } + e->from_constructor = 1; current_expand.offset = &c->offset; current_expand.repeat = &c->repeat; current_expand.component = c->n.component; |