Re: [Patch, fortran] PR121972 - [PDT] Fix for the pdt_86 leak.
Jerry D <[email protected]> Thu, 25 Jun 2026 21:03:09 -0700
| Newsgroups | gmane.comp.gcc.patches,gmane.comp.gcc.fortran |
|---|---|
| Message-ID | <[email protected]> |
On 6/24/26 11:18 AM, Harald Anlauf wrote: > Hi Jerry, Paul, > > Am 23.06.26 um 9:28 PM schrieb Jerry D: >> The master branch has been updated by Jerry DeLisle <[email protected]>: >> >> https://gcc.gnu.org/g:9579e3eb64ec89c4c0781bb0a59409f15c997213 >> >> commit r17-1786-g9579e3eb64ec89c4c0781bb0a59409f15c997213 >> Author: Jerry DeLisle <[email protected]> >> Date: Fri Jun 19 14:54:00 2026 -0700 >> >> The fix for the leak in pdt_82.f03 > [...] >>>>>> I'd rather leave the review to Paul, but I have one question: >>>>>> As is, the new helper has_class_alloc_comp might return true for >>>>>> pointer components, but I think it should not. >>>>>> >>>>>> Can you please check? >>>>>> >>>>> >>>>> Harald, I think you are right. I changed it to this: >>>>> >>>>> static bool >>>>> has_class_alloc_comp (gfc_symbol *der) >>>>> { >>>>> for (gfc_component *c = der->components; c; c = c->next) >>>>> if (c->ts.type == BT_CLASS && !c->attr.pointer) >>>>> return true; >>>>> return false; >>>>> } > > This should have been attr.class_pointer, the above does > not do what you think. But given Paul's comment, it is > not relevant. > I have made this change, complete fresh rebuild, and regression tested. Pushed as: The master branch has been updated by Jerry DeLisle <[email protected]>: https://gcc.gnu.org/g:039e2254d55e5d53f2766ead3495413b4788e00c commit r17-1909-g039e2254d55e5d53f2766ead3495413b4788e00c Author: Jerry DeLisle <[email protected]> Date: Thu Jun 25 20:54:48 2026 -0700 Jerry --