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

--- Comment #30 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jerry DeLisle <[email protected]>:

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

commit r16-5094-ga1fe2cfa8965ac298f6541d46b90156b1cb34726
Author: Jerry DeLisle <[email protected]>
Date:   Fri Nov 7 18:46:54 2025 -0800

    fortran: [PR121628]

    The PR121628 deep-copy helper reused a static seen_derived_types set
    across wrapper generation, so recursive allocatable arrays that appeared
    multiple times in a derived type caused infinite compile-time recursion.
    Save and restore the set around each wrapper build, polish follow-ups,
    and add a regression test to keep the scenario covered.

    gcc/fortran/ChangeLog:

            PR fortran/121628
            * trans-array.cc (seen_derived_types): Move to file scope and
            preserve/restore around generate_element_copy_wrapper.
            * trans-intrinsic.cc (conv_intrinsic_atomic_op): Reuse
            gfc_trans_force_lval when forcing addressable CAF temps.

    gcc/testsuite/ChangeLog:

            PR fortran/121628
            * gfortran.dg/alloc_comp_deep_copy_7.f90: New test.

    libgfortran/ChangeLog:

            PR fortran/121628
            * Makefile.in: Keep continuation indentation within 80 columns.
            * aclocal.m4: Regenerate.
            * libgfortran.h: Drop unused forward declaration.

    Signed-off-by: Christopher Albert <[email protected]>

Reply via email to