https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87881
--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Comment on attachment 45258 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45258 A slightly more elaborate version of Jakub's patch So, what will happen if there is more than one INQUIRY reference? The first iteration will set *newp to some expression and the next iteration will overwrite (memory leak) it with something different, so the last one wins?