https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97345
--- Comment #3 from kargl at gcc dot gnu.org --- (In reply to anlauf from comment #2) > + > + mpz_clear (do_start); > + mpz_clear (do_end); > + mpz_clear (do_step); > } Harald, when I was looking at this PR, I came to the conclusion that only do_step needs to be cleared. I think the do_start and do_end get hooked into an iterator, but don't remember the details. I got sidetracked on the the broken valgrind utilities I have on FreeBSD. I don't think a test case is needed if you use valgrind to verify that the memory leaks are gone. Sure, there are enough do-loop tests already present in the testsuite that will fail if the patch goes left.