https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62041
--- Comment #4 from Marc Glisse <glisse at gcc dot gnu.org> --- (The gimple version works with -ffast-math at least) In fold-const.c, fold_real_zero_addition_p has: /* In a vector or complex, we would need to check the sign of all zeros. */ if (TREE_CODE (addend) != REAL_CST) return false; We should probably check the sign of all zeros indeed.