Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/var-expand2.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* { dg-do run } */ /* { dg-options "-O2 -funroll-loops -ffast-math -fvariable-expansion-in-unroller" } */ extern void abort (void); float array[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; int foo (int n) { unsigned i; float accum = 0; for (i = 0; i < n; i++) accum += array[i]; if (accum != 55) abort (); return 0; } int main (void) { return foo (10); }