https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113475
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:895a2138265fd9cace3588404523122f73626d2a commit r14-8229-g895a2138265fd9cace3588404523122f73626d2a Author: Richard Biener <rguent...@suse.de> Date: Thu Jan 18 13:23:27 2024 +0100 tree-optimization/113475 - fix memory leak in phi_analyzer phi_analyzer leaks all phi_group objects it allocates. The following fixes this by maintaining a vector of allocated objects and release them when destroying the phi_analyzer object. PR tree-optimization/113475 * gimple-range-phi.h (phi_analyzer::m_phi_groups): New. * gimple-range-phi.cc (phi_analyzer::phi_analyzer): Initialize. (phi_analyzer::~phi_analyzer): Deallocate and free collected phi_grous. (phi_analyzer::process_phi): Record allocated phi_groups.