gcc/ChangeLog:
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / 20030218-1.c
blobeea227bfa2db8944bd9d16f34232c234eeefca47
1 /* { dg-do compile } */
2 /* { dg-options "-mcpu=8540 -mspe -mabi=spe -mfloat-gprs=single" } */
3 /* { dg-skip-if "not an SPE target" { ! powerpc_spe_nocache } } */
5 /* Test vectors that can interconvert without a cast. */
7 __ev64_opaque__ opp;
8 int vint __attribute__((vector_size (8)));
9 short vshort __attribute__((vector_size (8)));
10 float vfloat __attribute__((vector_size (8)));
12 int
13 main (void)
15 __ev64_opaque__ george = { 1, 2 }; /* { dg-error "opaque vector types cannot be initialized" } */
17 opp = vfloat;
18 vshort = opp;
19 vfloat = vshort; /* { dg-error "incompatible types when assigning" } */
21 /* Just because this is a V2SI, it doesn't make it an opaque. */
22 vint = vshort; /* { dg-message "note: use -flax-vector-conversions to permit conversions between vectors with differing element types or numbers of subparts" } */
23 /* { dg-error "incompatible types when assigning" "" { target *-*-* } .-1 } */
25 return 0;