(I forgot to send this at the time)

On Sun, 4 Nov 2012, Richard Biener wrote:

-         else if (!INTEGRAL_TYPE_P (type) && TREE_CODE (type) !=
VECTOR_TYPE)
+         else if (!INTEGRAL_TYPE_P (type) && !VOID_TYPE_P (type)
+                  && TREE_CODE (type) != VECTOR_TYPE)
[...]
Ok for this part.

Applied, thanks.

Index: gcc/tree-cfg.c
===================================================================
--- gcc/tree-cfg.c      (revision 193060)
+++ gcc/tree-cfg.c      (working copy)
@@ -3263,21 +3263,30 @@ verify_gimple_comparison (tree type, tre
       error ("mismatching comparison operand types");
       debug_generic_expr (op0_type);
       debug_generic_expr (op1_type);
       return true;
     }

   /* 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))
-    ;
+    {
+      if (TREE_CODE (op0_type) == VECTOR_TYPE
+         || TREE_CODE (op1_type) == VECTOR_TYPE)
+        {
+          error ("vector comparison returning a boolean");
+          debug_generic_expr (op0_type);
+          debug_generic_expr (op1_type);
+          return true;
+        }

verify_gimple_* should have "positive" checks, thus, check that
if there are vector operands the comparison result should be a
vector.  Not complaining about a vector comparison having a
boolean result.

I wasn't sure what that was supposed to look like, so I dropped it for now.

--
Marc Glisse

Reply via email to