https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106864 --- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- prune_lambda_captures is supposed to prune these but it looks like it is not pruning it always.