Rebase.
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr55555.c
blob9e4226659d568983faabe362fc2ce7bf77124530
1 /* { dg-do run } */
3 double s[4] = { 1.0, 2.0, 3.0, 4.0 }, pol_x[2] = { 5.0, 6.0 };
5 __attribute__((noinline)) int
6 foo (void)
8 double coef_x[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
9 int lxp = 0;
10 if (lxp <= 1)
13 double t = pol_x[lxp];
14 long S;
15 long l = lxp * 4L - 1;
16 for (S = 1; S <= 4; S++)
17 coef_x[S + l] = coef_x[S + l] + s[S - 1] * t;
19 while (lxp++ != 1);
20 asm volatile ("" : : "r" (coef_x) : "memory");
21 for (lxp = 0; lxp < 8; lxp++)
22 if (coef_x[lxp] != ((lxp & 3) + 1) * (5.0 + (lxp >= 4)))
23 __builtin_abort ();
24 return 1;
27 int
28 main ()
30 asm volatile ("" : : : "memory");
31 if (!foo ())
32 __builtin_abort ();
33 return 0;