]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR fortran/15326 ([4.0 only] ICE with assumed length character strings)
authorRichard Sandiford <richard@codesourcery.com>
Thu, 8 Sep 2005 18:46:06 +0000 (18:46 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 8 Sep 2005 18:46:06 +0000 (18:46 +0000)
commit0348d6fd857a367763b2e7c59449aa545b5c8c14
treeb6a188c252604f0bb8093a302e7455b168cbfa98
parent5c9186cec38354d5b51e41cbfb37d89a1a8ddca9
re PR fortran/15326 ([4.0 only] ICE with assumed length character strings)

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.

From-SVN: r104040
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]