https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109007
--- Comment #3 from bugreporter66 at gmail dot com --- Thanks, I will try to find out and be more specific where exactly it leaks. It was my first attempt at reducing the code that would fit into 1MB attachment. Checked g++ 10.4 today, it works as it should. 11.3 and 12.1 were tested to show the issue so far.