[PATCH] Fortran: CLASS pointer function result in variable definition context [PR109846]

Harald Anlauf anlauf@gmx.de
Sun May 14 20:04:25 GMT 2023


Dear all,

Fortran allows functions in variable definition contexts when the
result variable is a pointer.  We already handle this for the
non-CLASS case (in 11+), but the logic that checks the pointer
attribute was looking in the wrong place for the CLASS case.

Once found, the fix is simple and obvious, see attached patch.

Regtested on x86_64-pc-linux-gnu.  OK for mainline?

Thanks,
Harald
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr109846.diff
Type: text/x-patch
Size: 2644 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20230514/eda88979/attachment.bin>


More information about the Gcc-patches mailing list