aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMarc Glisse <marc.glisse@inria.fr>2012-11-27 19:01:45 +0100
committerMarc Glisse <glisse@gcc.gnu.org>2012-11-27 18:01:45 +0000
commitd8d638d9e24917b0d4e42c93fcac2b740a8f0eab (patch)
tree34bdcafac6d64016cc8ac2a3106d7a715e9e6067 /gcc
parentc2a73de27f10388dcb8e457f7ccbeec798350492 (diff)
downloadgcc-d8d638d9e24917b0d4e42c93fcac2b740a8f0eab.zip
gcc-d8d638d9e24917b0d4e42c93fcac2b740a8f0eab.tar.gz
gcc-d8d638d9e24917b0d4e42c93fcac2b740a8f0eab.tar.bz2
tree-cfg.c (verify_gimple_comparison): Verify that vector comparison returns a vector.
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree-cfg.c11
2 files changed, 15 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e41e34d..230de33 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 169a205..b79c3af3 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -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