typeck.c (cp_build_unary_op): Accept float vectors.
authorMarc Glisse <marc.glisse@inria.fr>
Tue, 14 Oct 2014 13:40:36 +0000 (15:40 +0200)
committerMarc Glisse <glisse@gcc.gnu.org>
Tue, 14 Oct 2014 13:40:36 +0000 (13:40 +0000)
2014-10-14  Marc Glisse  <marc.glisse@inria.fr>

gcc/cp/
* typeck.c (cp_build_unary_op) [TRUTH_NOT_EXPR]: Accept float vectors.
gcc/testsuite/
* g++.dg/ext/vector9.C: Test ! with float vectors.

From-SVN: r216201

gcc/cp/ChangeLog
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/vector9.C

index c94916c89f5ae337b6116edf412b644cbf7f552e..50132ff1acb4311664c97afc9cc971c0de43f3b1 100644 (file)
@@ -1,3 +1,7 @@
+2014-10-14  Marc Glisse  <marc.glisse@inria.fr>
+
+       * typeck.c (cp_build_unary_op) [TRUTH_NOT_EXPR]: Accept float vectors.
+
 2014-10-13  H.J. Lu  <hongjiu.lu@intel.com>
 
        * mangle.c (mangle_conv_op_name_for_type): Cast elements to
index b4e6824796b26b2ecb03a9794d221eccaf72e294..5b4f5332a34580ea788a5bc4cac13ee1287509ee 100644 (file)
@@ -5723,7 +5723,7 @@ cp_build_unary_op (enum tree_code code, tree xarg, int noconvert,
       break;
 
     case TRUTH_NOT_EXPR:
-      if (VECTOR_INTEGER_TYPE_P (TREE_TYPE (arg)))
+      if (VECTOR_TYPE_P (TREE_TYPE (arg)))
        return cp_build_binary_op (input_location, EQ_EXPR, arg,
                                   build_zero_cst (TREE_TYPE (arg)), complain);
       arg = perform_implicit_conversion (boolean_type_node, arg,
index 59aca0d68c194fa8452df60261b1f7eb10457fd9..2f08ffe1c11134515f32e5713c5136198eb4eded 100644 (file)
@@ -1,3 +1,7 @@
+2014-10-14  Marc Glisse  <marc.glisse@inria.fr>
+
+       * g++.dg/ext/vector9.C: Test ! with float vectors.
+
 2014-10-14  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/63512
index 42d150dd345c015207e8ea22293c6c29db550e81..b1216c2b37d709c68d97fdebb6b4f8be3030e0e3 100644 (file)
@@ -7,4 +7,5 @@ void foo()
 {
   v4f v;
   !(v4i)v;
+  !v;
 }