https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79699
--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> --- Ah, thanks for the reference. It sounds like GCC should call mpfr_free_cache before exiting as is recommended in section 4.7 Memory Handling of the MPFR manual (as I just discovered by searching for the function): It is strongly advised to do that before terminating a thread, or before exiting when using tools like ‘valgrind’ (to avoid memory leaks being reported).