111
|
1 /* { dg-do compile } */
|
|
2 /* { dg-options "-mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } } */
|
|
3 /* { dg-prune-output "operand types are" } */
|
|
4 /* Ignore warning on some powerpc-ibm-aix configurations. */
|
|
5 /* { dg-prune-output "non-standard ABI extension" } */
|
|
6
|
|
7 #define vector(elcount, type) \
|
|
8 __attribute__((vector_size((elcount)*sizeof(type)))) type
|
|
9
|
|
10 void
|
|
11 foo (vector (4, int) x, vector (4, float) y)
|
|
12 {
|
|
13 vector (4, int) p4;
|
|
14 vector (4, int) r4;
|
|
15 vector (4, unsigned int) q4;
|
|
16 vector (8, int) r8;
|
|
17 vector (4, float) f4;
|
|
18
|
|
19 r4 = x > y; /* { dg-error "comparing vectors with different element types" } */
|
|
20 r8 = (x != p4); /* { dg-error "incompatible types when assigning to type|cannot convert" } */
|
|
21 r8 == r4; /* { dg-error "comparing vectors with different number of elements" } */
|
|
22 }
|