OSDN Git Service

PR target/34814
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / powerpc / 20030218-1.c
1 /* { dg-do compile { target powerpc-*-eabi* } } */
2 /* { dg-options "-mspe=yes" } */
3
4 /* Test vectors that can interconvert without a cast.  */
5
6 __ev64_opaque__ opp;
7 int vint   __attribute__((vector_size (8)));
8 short vshort __attribute__((vector_size (8)));
9 float vfloat __attribute__((vector_size (8)));
10
11 int
12 main (void)
13 {
14   __ev64_opaque__ george = { 1, 2 }; /* { dg-error "opaque vector types cannot be initialized" } */
15
16   opp = vfloat;
17   vshort = opp;
18   vfloat = vshort; /* { dg-error "incompatible types in assignment" } */
19
20   /* Just because this is a V2SI, it doesn't make it an opaque.  */
21   vint = vshort; /* { dg-error "incompatible types in assignment" } */
22
23   return 0;
24 }