complex-lowering: Better handling of PAREN_EXPR [PR68855]
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20050604-1.c
blobc2db2be95d5d43de2d77e5fa2048b0d1972a96f7
1 /* PR regression/21897 */
2 /* This testcase generates MMX instructions together with x87 instructions.
3 Currently, there is no "emms" generated to switch between register sets,
4 so the testcase fails for targets where MMX insns are enabled. */
5 /* { dg-options "-mno-mmx" { target { x86_64-*-* i?86-*-* } } } */
7 extern void abort (void);
9 typedef unsigned short v4hi __attribute__ ((vector_size (8)));
10 typedef float v4sf __attribute__ ((vector_size (16)));
12 union
14 v4hi v;
15 short s[4];
16 } u;
18 union
20 v4sf v;
21 float f[4];
22 } v;
24 void
25 foo (void)
27 unsigned int i;
28 for (i = 0; i < 2; i++)
29 u.v += (v4hi) { 12, 32768 };
30 for (i = 0; i < 2; i++)
31 v.v += (v4sf) { 18.0, 20.0, 22 };
34 int
35 main (void)
37 foo ();
38 if (u.s[0] != 24 || u.s[1] != 0 || u.s[2] || u.s[3])
39 abort ();
40 if (v.f[0] != 36.0 || v.f[1] != 40.0 || v.f[2] != 44.0 || v.f[3] != 0.0)
41 abort ();
42 return 0;