https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122386
Bug ID: 122386
Summary: Wrong code with TRANSFER of subarray component
references
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: anlauf at gcc dot gnu.org
Target Milestone: ---
Created attachment 62617
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62617&action=edit
Testcase
The attached testcase is derived from transfer_array_subref.f90 (pr102891)
but with the intrinsic complex type replaced by a suitable derived type.
This fails for all gfortran versions.
I tried to resolve it by extending r16-518, which forced the generation of
temporaries for actual arguments in the testcase, but testing more I ran
into several regressions.
This suggests that this patch only coincidentally fixed the other pr, and
I found another case where this temporary is undesired. A separate pr
with testcase will follow.