https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118441

--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tobias Burnus <bur...@gcc.gnu.org>:

https://gcc.gnu.org/g:c5a8e22c5dacf4f9d4f66e60990bf34c70f04714

commit r15-6953-gc5a8e22c5dacf4f9d4f66e60990bf34c70f04714
Author: Tobias Burnus <tbur...@baylibre.com>
Date:   Thu Jan 16 11:50:26 2025 +0100

    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.

Reply via email to