2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / gcc.dg / 20030218-1.c
blobe41152c21c1475925ad0174a45776a725020065b
1 /* { dg-do compile { target powerpc-*-eabi* } } */
2 /* { dg-options "-mcpu=8540" } */
4 /* Test vectors that can interconvert without a cast. */
6 typedef int __attribute__((mode(V2SI))) __ev64_opaque__;
8 __ev64_opaque__ opp;
9 int vint __attribute__((mode(V2SI)));
10 int vshort __attribute__((mode(V4HI)));
11 int vfloat __attribute__((mode(V2SF)));
13 int
14 main (void)
16 __ev64_opaque__ george = { 1, 2 }; /* { dg-error "opaque vector types cannot be initialized" } */
18 opp = vfloat;
19 vshort = opp;
20 vfloat = vshort; /* { dg-error "incompatible types in assignment" } */
22 /* Just because this is a V2SI, it doesn't make it an opaque. */
23 vint = vshort; /* { dg-error "incompatible types in assignment" } */
25 return 0;