https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107127
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-12 branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:b585bd941ea2e5c1cca52e40210483b556ce2ed7 commit r12-9120-gb585bd941ea2e5c1cca52e40210483b556ce2ed7 Author: Jakub Jelinek <ja...@redhat.com> Date: Wed Nov 23 19:09:31 2022 +0100 c: Fix compile time hog in c_genericize [PR107127] The complex multiplications result in deeply nested set of many SAVE_EXPRs, which takes even on fast machines over 5 minutes to walk. This patch fixes that by using walk_tree_without_duplicates where it is instant. 2022-11-23 Andrew Pinski <apin...@marvell.com> Jakub Jelinek <ja...@redhat.com> PR c/107127 * c-gimplify.cc (c_genericize): Use walk_tree_without_duplicates instead of walk_tree for c_genericize_control_r. * gcc.dg/pr107127.c: New test. (cherry picked from commit 8a0fce6a51915c29584427fd376b40073c328090)