I was too enthusiastic, the different behavior is not a valid optimization strategy, but apparently a fundamentally different interpretation of the standard by the various compilers, see Intrinsic assigment of derived types containing components with user defined assignment. So, at the end, even if the wrapping strategy may in theory solve many problems, it can not be relied on currently due to implementation differences in various compilers.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Finalization/Copy in intrinsic polymorphic assignment | 3 | 772 | November 29, 2021 | |
Defined assignment for polymorphic variables | 8 | 1125 | March 14, 2022 | |
Questions about derived type intrinsic assignment
|
20 | 267 | July 15, 2024 | |
Double finalization on assignment | 4 | 497 | April 7, 2022 | |
Intrinsic assigment of derived types containing components with user defined assignment | 3 | 681 | January 14, 2022 |