[Patch, fortran] PR59104
Paul Richard Thomas
paul.richard.thomas@gmail.com
Sun Jun 9 06:14:39 GMT 2024
Hi All,
The attached fixes a problem that, judging by the comments, has been looked
at periodically over the last ten years but just looked to be too
fiendishly complicated to fix. This is not in small part because of the
confusing ordering of dummies in the tlink chain and the unintuitive
placement of all deferred initializations to the front of the init chain in
the wrapped block.
The result of the existing ordering is that the initialization code for
non-dummy variables that depends on the function result occurs before any
initialization code for the function result itself. The fix ensures that:
(i) These variables are placed correctly in the tlink chain, respecting
inter-dependencies; and (ii) The dependent initializations are placed at
the end of the wrapped block init chain. The details appear in the
comments in the patch. It is entirely possible that a less clunky fix
exists but I failed to find it.
OK for mainline?
Regards
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://gcc.gnu.org/pipermail/fortran/attachments/20240609/69215e52/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Change.Logs
Type: application/octet-stream
Size: 1366 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/fortran/attachments/20240609/69215e52/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: submit.diff
Type: text/x-patch
Size: 12589 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/fortran/attachments/20240609/69215e52/attachment-0001.bin>
More information about the Fortran
mailing list