Skip to content
Snippets Groups Projects
Commit c5a8e22c authored by Tobias Burnus's avatar Tobias Burnus
Browse files

Fortran: Create fresh ts.u.cl for result in gfc_get_symbol_for_expr [PR118441]

For intrinsic routines, called in libraries, the prototype is created from
the call via gfc_get_symbol_for_expr. For the actual arguments, it calls
gfc_copy_formal_args_intr which already ensures that the ts.u.cl is freshly
allocated.

This commit now ensures the same for character-returning functions.

	PR fortran/118441

gcc/fortran/ChangeLog:

	* trans-intrinsic.cc (gfc_get_symbol_for_expr): Use
	gfc_new_charlen for character-returning functions.

gcc/testsuite/ChangeLog:

	* gfortran.dg/gomp/intrinsic_pack_7.f90: New test.
parent 462a7f45
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment