1 /* { dg-do run } */
2
3 double s[4] = { 1.0, 2.0, 3.0, 4.0 }, pol_x[2] = { 5.0, 6.0 };
4
5 __attribute__((noinline)) int
foo(void)6 foo (void)
7 {
8 double coef_x[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
9 int lxp = 0;
10 if (lxp <= 1)
11 do
12 {
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;
18 }
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;
25 }
26
27 int
main()28 main ()
29 {
30 asm volatile ("" : : : "memory");
31 if (!foo ())
32 __builtin_abort ();
33 return 0;
34 }
35