16.9.129 point 4: the result is polymorphic if and only if both TSOURCE and
FSOURCE are polymorphic.
If neither TSOURCE and FSOURCE are polymorphic then the current behavior is
preserved.
Depends on D145058
Paths
| Differential D145060
[flang] MERGE result is polymorphic only if TSOURCE and FSOURCE are polymorphic ClosedPublic Authored by clementval on Mar 1 2023, 5:10 AM.
Details Summary 16.9.129 point 4: the result is polymorphic if and only if both TSOURCE and If neither TSOURCE and FSOURCE are polymorphic then the current behavior is Depends on D145058
Diff Detail
Event TimelineHerald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 1 2023, 5:10 AM Comment Actions LGTM
This revision is now accepted and ready to land.Mar 1 2023, 6:00 AM clementval added inline comments.
Closed by commit rGed05dcc57bf9: [flang] MERGE result is polymorphic only if TSOURCE and FSOURCE are polymorphic (authored by clementval). · Explain WhyMar 1 2023, 6:46 AM This revision was automatically updated to reflect the committed changes. clementval marked an inline comment as done.
Revision Contents
Diff 501498 flang/lib/Optimizer/Builder/IntrinsicCall.cpp
flang/test/Lower/polymorphic-temp.f90
|
I think it is important to tell that TSOURCE and FSOURCE must have the same dynamic type in this case so the polymorphic one can be converted instead of being reboxed to the declared type.