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
This commit is contained in:
parent
6e20eae994
commit
462643f011
@ -1,3 +1,9 @@
|
||||
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);
|
||||
|
@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
15
gcc/testsuite/gcc.dg/vector-1.c
Normal file
15
gcc/testsuite/gcc.dg/vector-1.c
Normal file
@ -0,0 +1,15 @@
|
||||
/* { 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user