https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116081
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I think I found it: while (k > 0 && elts[k - 1] == neutral_op) I think that should be since both elts[k - 1] and neutral_op are trees: while (k > 0 && operand_equal_p (elts[k - 1], neutral_op))