PR fortran/15326
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Sep 2005 18:46:06 +0000 (18:46 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Sep 2005 18:46:06 +0000 (18:46 +0000)
commit08569428cf820762a248780ed677e70a19a7443b
treeb6a188c252604f0bb8093a302e7455b168cbfa98
parentf6a03622063d42fe3c5580c2a41c32fc5327e91d
PR fortran/15326
* trans-array.c (gfc_add_loop_ss_code): Set ss->string_length in
the GFC_SS_FUNCTION case too.
* trans-expr.c (gfc_conv_function_val): Allow symbols to be bound
to function pointers as well as function decls.
(gfc_interface_sym_mapping, gfc_interface_mapping): New structures.
(gfc_init_interface_mapping, gfc_free_interface_mapping)
(gfc_get_interface_mapping_charlen, gfc_get_interface_mapping_array)
(gfc_set_interface_mapping_bounds, gfc_add_interface_mapping)
(gfc_finish_interface_mapping, gfc_apply_interface_mapping_to_cons)
(gfc_apply_interface_mapping_to_ref)
(gfc_apply_interface_mapping_to_expr)
(gfc_apply_interface_mapping): New functions.
(gfc_conv_function_call): Evaluate the arguments before working
out where the result should go.  Make the null pointer case provide
the string length in parmse.string_length.  Cope with non-constant
string lengths, using the above functions to evaluate such lengths.
Use a temporary typespec; don't assign to sym->cl->backend_decl.
Don't assign to se->string_length when returning a cached array
descriptor.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104040 138bc75d-0d04-0410-961f-82ee72b054a4
12 files changed:
gcc/fortran/ChangeLog
gcc/fortran/trans-array.c
gcc/fortran/trans-expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/char_result_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/char_result_2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/char_result_3.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/char_result_4.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/char_result_5.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/char_result_6.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/char_result_7.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/char_result_8.f90 [new file with mode: 0644]