https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91537
--- Comment #3 from Rich Townsend <townsend at astro dot wisc.edu> --- (In reply to Thomas Koenig from comment #1) > Comment on attachment 46748 [details] > Leak demonstration program > > Here's the output on current trunk: > > 86 2548 > 87 2548 > 88 2548 > 89 2548 > 90 2548 > 91 2548 > 92 2548 > 93 2548 > 94 2548 > 95 2548 > 96 2548 > 97 2548 > 98 2548 > 99 2548 > 100 2548 > > Same output with gcc 9. > > So, I think the advice would be to upgrade to gcc 9. Just tried upgrading, and the leak vanishes as you say. Also fixes the production code that my example was based on. Thanks for the quick response! cheers, Rich