https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104280
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Actually you're right, we in fact enforce this: /* The resulting type of a comparison may be an effective boolean type. */ if (INTEGRAL_TYPE_P (type) && (TREE_CODE (type) == BOOLEAN_TYPE || TYPE_PRECISION (type) == 1)) ... /* Or a boolean vector type with the same element count as the comparison operand types. */ else if (TREE_CODE (type) == VECTOR_TYPE && TREE_CODE (TREE_TYPE (type)) == BOOLEAN_TYPE) ... else { error ("bogus comparison result type");