Merge reload-branch up to revision 101000
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20050604-1.c
blob70097aa14cb06457ee5310fdae69bd824ec9d5f3
1 /* PR regression/21897 */
3 extern void abort (void);
5 typedef short v4hi __attribute__ ((vector_size (8)));
6 typedef float v4sf __attribute__ ((vector_size (16)));
8 union
10 v4hi v;
11 short s[4];
12 } u;
14 union
16 v4sf v;
17 float f[4];
18 } v;
20 void
21 foo (void)
23 unsigned int i;
24 for (i = 0; i < 2; i++)
25 u.v += (v4hi) { 12, 14 };
26 for (i = 0; i < 2; i++)
27 v.v += (v4sf) { 18.0, 20.0, 22 };
30 int
31 main (void)
33 foo ();
34 if (u.s[0] != 24 || u.s[1] != 28 || u.s[2] || u.s[3])
35 abort ();
36 if (v.f[0] != 36.0 || v.f[1] != 40.0 || v.f[2] != 44.0 || v.f[3] != 0.0)
37 abort ();
38 return 0;