This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR fortran/15326: returning strings with non-constant lengths


On Friday 02 September 2005 09:57, Richard Sandiford wrote:
> There are some things I know don't work for unrelated reasons.

Do you know if there are PRs for these things? If not then it's probably worth 
creating, unless you're already planning on fixing them soon.

> gcc/fortran/
> 	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.

Ok.

> gcc/testsuite/
> 	PR fortran/15326
> 	* gfortran.fortran-torture/execute/pr15326-1.f90,
> 	* gfortran.fortran-torture/execute/pr15326-2.f90,
> 	* gfortran.fortran-torture/execute/pr15326-3.f90,
> 	* gfortran.fortran-torture/execute/pr15326-4.f90,
> 	* gfortran.fortran-torture/execute/pr15326-5.f90,
> 	* gfortran.fortran-torture/execute/pr15326-6.f90,
> 	* gfortran.fortran-torture/execute/pr15326-7.f90
> 	* gfortran.fortran-torture/execute/pr15326-8.f90: New tests.

Previous comments about testcases apply. Preferred naming is eg.
character_result_1.f90, and mention the PR in a comment.

Paul


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]