https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70847
--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 38638 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38638&action=edit gcc7-pr70847.patch So, shall I test this version? As added bonus, if cp_fold returns for different stmts the same return value for whatever reason, we wouldn't walk the subtrees on it more than once.