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 } { "*" } { "" } } */
4
5/* Test vectors that can interconvert without a cast.  */
6
7__ev64_opaque__ opp;
8int vint   __attribute__((vector_size (8)));
9short vshort __attribute__((vector_size (8)));
10float vfloat __attribute__((vector_size (8)));
11
12int
13main (void)
14{
15  __ev64_opaque__ george = { 1, 2 }; /* { dg-error "opaque vector types cannot be initialized" } */
16
17  opp = vfloat;
18  vshort = opp;
19  vfloat = vshort; /* { dg-error "incompatible types when assigning" } */
20
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 *-*-* } 22 } */
24
25  return 0;
26}
27