2015-05-04 Sandra Loosemore <sandra@codesourcery.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / vmx / spill2.c
blob4c7337bd08a76b26e48b63d623634a8e64e8f55d
1 #include <altivec.h>
2 extern vector unsigned char u8(void);
3 extern vector signed char s8(void);
4 extern vector bool char b8(void);
5 extern vector unsigned short u16(void);
6 extern vector signed short s16(void);
7 extern vector bool short b16(void);
8 extern vector unsigned int u32(void);
9 extern vector signed int s32(void);
10 extern vector bool int b32(void);
11 extern vector float f32(void);
12 extern vector pixel p16(void);
13 extern double d(void);
14 extern int i(void);
16 extern void g(vector unsigned char, ...);
18 void f()
20 int i1l = i();
21 vector unsigned char u8l = u8();
22 vector signed char s8l = s8();
23 vector bool char b8l = b8();
24 int i2l = i();
25 vector unsigned short u16l = u16();
26 vector signed short s16l = s16();
27 vector bool short b16l = b16();
28 int i3l = i();
29 vector unsigned int u32l = u32();
30 vector signed int s32l = s32();
31 vector bool int b32l = b32();
32 double d1l = d();
33 vector float f32l = f32();
34 vector pixel p16l = p16();
35 double d2l = d();
36 vector unsigned char u8lx = u8();
37 vector signed char s8lx = s8();
38 vector bool char b8lx = b8();
39 vector unsigned short u16lx = u16();
40 vector signed short s16lx = s16();
41 vector bool short b16lx = b16();
42 vector unsigned int u32lx = u32();
43 vector signed int s32lx = s32();
44 vector bool int b32lx = b32();
45 vector float f32lx = f32();
46 vector pixel p16lx = p16();
48 if (i1l)
49 g(u8l, s8l, b8l, u16l, s16l, b16l, u32l, s32l, b32l, f32l, p16l,
50 u8lx, s8lx, b8lx, u16lx, s16lx, b16lx, u32lx, s32lx, b32lx, f32lx, p16lx,
51 i1l, i2l, i3l, d1l, d2l);
52 g(u8l, i1l, i2l, i3l, d1l, d2l);
55 double
56 d(void)
58 static double zero;
59 return zero;
62 int
63 i(void)
65 static int non_zero;
66 return ++non_zero;
69 vector unsigned char
70 u8(void)
72 static vector unsigned char zero;
73 return zero;
76 vector signed char
77 s8(void)
79 static vector signed char zero;
80 return zero;
83 vector bool char
84 b8(void)
86 static vector bool char zero;
87 return zero;
90 vector unsigned short
91 u16(void)
93 static vector unsigned short zero;
94 return zero;
97 vector signed short
98 s16(void)
100 static vector signed short zero;
101 return zero;
104 vector bool short
105 b16(void)
107 static vector bool short zero;
108 return zero;
111 vector unsigned int
112 u32(void)
114 static vector unsigned int zero;
115 return zero;
118 vector signed int
119 s32(void)
121 static vector signed int zero;
122 return zero;
125 vector bool int
126 b32(void)
128 static vector bool int zero;
129 return zero;
132 vector float
133 f32(void)
135 static vector float zero;
136 return zero;
139 vector pixel
140 p16(void)
142 static vector pixel zero;
143 return zero;
146 void
147 g(vector unsigned char a, ...)
151 int main()
153 f();
154 return 0;