https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78568
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- That is not how C++ c_fully_fold works. There it can be called multiple times, and it does some caching to avoid consuming too much time, but the caches can be flushed at certain times.