Re: [Patch, PR Fortran/90069] Polymorphic Return Type Memory Leak Without Intermediate Variable

2024-05-29 Thread Andre Vehreschild
Hi Harald, thanks for the review. Very much appreciated. Commited as 2f97d98d174e3ef9f3a9a83c179d787abde5e066. I have some patches for memory leaks I will post in the next days. I am inclined to backport them together to 14-line, if no new bugs arise. About the SAVE_EXPR, Richard Biener shed

Re: [Patch, PR Fortran/90069] Polymorphic Return Type Memory Leak Without Intermediate Variable

2024-05-29 Thread Richard Biener
On Tue, May 28, 2024 at 9:46 PM Harald Anlauf wrote: > > Hi Andre, > > On 5/28/24 14:10, Andre Vehreschild wrote: > > Hi all, > > > > the attached patch fixes a memory leak with unlimited polymorphic return > > types. > > The leak occurred, because an expression with side-effects was evaluated

Re: [Patch, PR Fortran/90069] Polymorphic Return Type Memory Leak Without Intermediate Variable

2024-05-28 Thread Harald Anlauf
Hi Andre, On 5/28/24 14:10, Andre Vehreschild wrote: Hi all, the attached patch fixes a memory leak with unlimited polymorphic return types. The leak occurred, because an expression with side-effects was evaluated twice. I have substituted the check for non-variable expressions followed by

[Patch, PR Fortran/90069] Polymorphic Return Type Memory Leak Without Intermediate Variable

2024-05-28 Thread Andre Vehreschild
Hi all, the attached patch fixes a memory leak with unlimited polymorphic return types. The leak occurred, because an expression with side-effects was evaluated twice. I have substituted the check for non-variable expressions followed by creating a SAVE_EXPR with checking for trees with side