Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/torture/pr55555.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* { dg-do run } */ double s[4] = { 1.0, 2.0, 3.0, 4.0 }, pol_x[2] = { 5.0, 6.0 }; __attribute__((noinline)) int foo (void) { double coef_x[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; int lxp = 0; if (lxp <= 1) do { double t = pol_x[lxp]; long S; long l = lxp * 4L - 1; for (S = 1; S <= 4; S++) coef_x[S + l] = coef_x[S + l] + s[S - 1] * t; } while (lxp++ != 1); asm volatile ("" : : "r" (coef_x) : "memory"); for (lxp = 0; lxp < 8; lxp++) if (coef_x[lxp] != ((lxp & 3) + 1) * (5.0 + (lxp >= 4))) __builtin_abort (); return 1; } int main () { asm volatile ("" : : : "memory"); if (!foo ()) __builtin_abort (); return 0; }