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

--- Comment #5 from David Binderman <dcb314 at hotmail dot com> ---
(In reply to Christopher Albert from comment #4)
> Created attachment 63710 [details]
> Avoid ICE in recursive allocatable deep copy
> 
> The fix restricts the recursive-array helper path in structure_alloc_comps
> to direct self-recursion (not any mutually-recursive “seen” type) and caches
> generated copy-helper wrappers, preventing the bad deep-copy code path that
> triggered the gfc_build_addr_expr ICE.

This seems to work for the test case, but breaks for other code.
See trunk/Fortran/0583/0583_0023.f90 in the fujitsu test suite.

trunk/Fortran/0583/0583_0023.f90
trunk/Fortran/0583/0583_0023.f90:13:10:

   13 | CALL SUB()
      |          ^
Error: location references block not in block tree
copy_element.12
_gfortran_cfi_deep_copy_array (_74, _69, copy_element.12);
during IPA pass: *free_lang_data
trunk/Fortran/0583/0583_0023.f90:13:10: internal compiler error: verify_gimple
failed

Reply via email to