[PATCH] Fortran: associate to a contiguous pointer or target [PR122977]

Harald Anlauf anlauf@gmx.de
Thu Dec 4 21:25:37 GMT 2025


Dear All,

the attached patch fixes a regression when trying to associate
to a pointer target with the contiguous attribute.

While trying the obvious fix, I saw that gfc_is_simply_contiguous
is not working properly when applied to an associate variable,
and even more so for nested associate constructs.  So we now
also recursively look at the associate target to get this right.
See testcase for simple use cases.

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

Thanks,
Harald

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr122977.diff
Type: text/x-patch
Size: 3894 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/fortran/attachments/20251204/ec6ec676/attachment-0003.bin>


More information about the Fortran mailing list