PR C/30427
* c-typeck.c (build_unary_op <case BIT_NOT_EXPR>): Reject vector float
types.
2007-08-13 Andrew Pinski <pinskia@gmail.com>
PR C/30427
* gcc.dg/vector-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127396
138bc75d-0d04-0410-961f-
82ee72b054a4
+2007-08-13 Andrew Pinski <pinskia@gmail.com>
+
+ PR C/30427
+ * c-typeck.c (build_unary_op <case BIT_NOT_EXPR>): Reject vector float
+ types.
+
2007-08-13 Nick Clifton <nickc@redhat.com>
* config/arm/arm_neon.h: Revert GPLv3 patch to this file.
break;
case BIT_NOT_EXPR:
- if (typecode == INTEGER_TYPE || typecode == VECTOR_TYPE)
+ /* ~ works on integer types and non float vectors. */
+ if (typecode == INTEGER_TYPE
+ || (typecode == VECTOR_TYPE
+ && !VECTOR_FLOAT_TYPE_P (TREE_TYPE (arg))))
{
if (!noconvert)
arg = default_conversion (arg);
+2007-08-13 Andrew Pinski <pinskia@gmail.com>
+
+ PR C/30427
+ * gcc.dg/vector-1.c: New test.
+
2007-08-13 Richard Sandiford <richard@codesourcery.com>
* gcc.dg/pr21255-4.c: Skip for PIC.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+/* Check for application of ~ on vector types. */
+
+#define vector __attribute__((vector_size(16) ))
+
+vector float a;
+vector int a1;
+
+int f(void)
+{
+ a = ~a; /* { dg-error "" } */
+ a1 = ~a1;
+}