commit cbf13b08495010d24a784170f76684e5109bd92b
Author: Jason Merrill <jason@redhat.com>
Date: Fri Feb 28 23:56:22 2014 -0500
PR c++/58845
* typeck.c (cp_build_binary_op): Sorry on vector&&vector.
@@ -4177,6 +4177,11 @@ cp_build_binary_op (location_t location,
case TRUTH_ORIF_EXPR:
case TRUTH_AND_EXPR:
case TRUTH_OR_EXPR:
+ if (VECTOR_TYPE_P (type0) || VECTOR_TYPE_P (type1))
+ {
+ sorry ("logical operation on vector type");
+ return error_mark_node;
+ }
result_type = boolean_type_node;
break;
new file mode 100644
@@ -0,0 +1,7 @@
+// PR c++/58845
+
+void foo()
+{
+ int v __attribute__((vector_size(8)));
+ v = v || v; // { dg-bogus "" "" { xfail *-*-* } }
+}