tree-cfg.c (verify_gimple_comparison): Verify that vector comparison returns a vector.
authorMarc Glisse <marc.glisse@inria.fr>
Tue, 27 Nov 2012 18:01:45 +0000 (19:01 +0100)
committerMarc Glisse <glisse@gcc.gnu.org>
Tue, 27 Nov 2012 18:01:45 +0000 (18:01 +0000)
2012-11-27  Marc Glisse  <marc.glisse@inria.fr>

* tree-cfg.c (verify_gimple_comparison): Verify that vector
comparison returns a vector.

From-SVN: r193862

gcc/ChangeLog
gcc/tree-cfg.c

index e41e34d323029d3eb72439276d5be65ad640eb46..230de334b7c9f7a99a1e3d55f394f4e3b651631e 100644 (file)
@@ -1,3 +1,8 @@
+2012-11-27  Marc Glisse  <marc.glisse@inria.fr>
+
+       * tree-cfg.c (verify_gimple_comparison): Verify that vector
+       comparison returns a vector.
+
 2012-11-27  Meador Inge  <meadori@codesourcery.com>
 
        * collect2.c (main): Call find_file_set_debug.
index 169a205d39ab3be5e64e43ead8fe36762f3f0329..b79c3af3cf3ae07944a3a674730d76d1b7b041ba 100644 (file)
@@ -3266,7 +3266,16 @@ verify_gimple_comparison (tree type, tree op0, tree op1)
   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;
+        }
+    }
   /* Or an integer vector type with the same size and element count
      as the comparison operand types.  */
   else if (TREE_CODE (type) == VECTOR_TYPE