Re: {Patch, fortran] PR125669 - [PDT] Parameterized constant size and string length components are allocated and freed
Jerry Delisle <[email protected]> Mon, 8 Jun 2026 07:29:38 -0700
| Newsgroups | gmane.comp.gcc.patches,gmane.comp.gcc.fortran |
|---|---|
| Message-ID | <CAJJq7z2mbUapbjK6ng31wTkVOifPRW8XXdKhhctZ-LZcC6kSbg@mail.gmail.com> |
``` This looks quite simple. Thanks for the fix. Ok for mainline and backport at will. Regards, Jerry ``` On Mon, Jun 8, 2026, 4:37 AM Paul Richard Thomas < [email protected]> wrote: > Hello all, > > I have been aware of this problem for a long time but did not get > around to fixing it: > > Even if all the bounds of parameterized array components all > simplified to constants, gfortran has been setting the pdt_array > attribute, which results in unnecessary mallocs and frees. The same is > true of parameterized constant length character components. > > The attached patch fixes the problem and passes regression testing on > FC44/x86_64. > > OK for mainline and backporting to gcc-16? > > Paul >