Commit 462643f0 by Andrew Pinski Committed by Andrew Pinski

re PR c/30427 (~ vector float is accepted)

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  Andrew Pinski  <pinskia@gmail.com>

        PR C/30427
        *  gcc.dg/vector-1.c: New test.

From-SVN: r127396
parent 6e20eae9
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.
......
......@@ -2832,7 +2832,10 @@ build_unary_op (enum tree_code code, tree xarg, int flag)
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.
/* { 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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment