Remove KIND argument from INDEX so it does not mess up scalarization.
authorThomas Koenig <tkoenig@gcc.gnu.org>
Mon, 30 Dec 2019 10:43:38 +0000 (10:43 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Mon, 30 Dec 2019 10:43:38 +0000 (10:43 +0000)
commitd09847357b965a2c2cda063827ce362d4c9c86f2
tree4ba267b816f649e42c6fda947c92832f81c01fc8
parent672511187345d30ccd725214ac4b34b181bd6569
Remove KIND argument from INDEX so it does not mess up scalarization.

2019-12-30  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/91541
* intrinsic.c (add_sym_4ind): New function.
(add_functions): Use it for INDEX.
(resolve_intrinsic): Also call f1m for INDEX.
* intrinsic.h (gfc_resolve_index_func): Adjust prototype to
take a gfc_arglist instead of individual arguments.
* iresolve.c (gfc_resolve_index_func): Adjust arguments.
Remove KIND argument if present, and make sure this is
not done twice.
* trans-decl.c: Include "intrinsic.h".
(gfc_get_extern_function_decl): Special case for resolving INDEX.

2019-12-30  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/91541
* gfortran.dg/index_3.f90: New test.

From-SVN: r279763
gcc/fortran/ChangeLog
gcc/fortran/intrinsic.c
gcc/fortran/intrinsic.h
gcc/fortran/iresolve.c
gcc/fortran/trans-decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/index_3.f90 [new file with mode: 0644]