https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107127
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- If anything it is the walk of the tree in c_genericize (c-gimplify.c) Which is causing the issue. + walk_tree (&DECL_SAVED_TREE (fndecl), c_genericize_control_r, + NULL, NULL); I suspect walk_tree_without_duplicates might fix this rather than using walk_tree here.