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.
Loading
Please register or sign in to comment