blob: 914910c34768ba9701b3112423f261e3d3c28df1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
/* { dg-do compile { target powerpc*-*-* } } */
/* { dg-options "-maltivec" } */
/* Program to test the vector_size attribute. This needs to run on a
target that has vectors, so use AltiVec. */
vector int foobar;
/* Only floats and integrals allowed. We don't care if they map to SIs. */
struct X { int frances; };
/* APPLE LOCAL AltiVec */
vector struct X hotdog; /* { dg-error "(syntax error|invalid vector type)" } */
/* Arrays of vectors. */
vector char b[10], ouch;
/* Pointers of vectors. */
vector short *shoe, polish;
int xxx[sizeof(foobar) == 16 ? 69 : -1];
int nc17[sizeof(shoe) == sizeof (char *) ? 69 : -1];
code ()
{
*shoe = polish;
b[1] = ouch;
}
vector short
hoop ()
{
return polish;
}
|