https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106750

--- Comment #3 from federico <federico.perini at gmail dot com> ---
Thank you for checking this. 
So if I make the temporary array explicit, the leak goes away. 

In the case of the example i.e. 1) fixed-size and 2) very few elements are
passed to the routine, it seems it would just be better to pass them as
scalars, to avoid any temporaries from being at all created: 


     j(i) = do_with_scalars(ts(choose(1)),ts(choose(2))) ! no more MEMORY LEAK

Reply via email to