1 int a[1] = {1}; 2 3 static int __attribute__((noinline)) foo(int n)4foo(int n) 5 { 6 int i, c = 0; 7 for (i = 0; i < n; i++) 8 c += a[i]; 9 return c; 10 } 11 12 int b[2] = {2, 3}; 13 bar(int n)14static int __attribute__((noinline)) bar(int n) 15 { 16 int i, c = 0; 17 for (i = 0; i < n; i++) 18 c += b[i]; 19 return c; 20 } 21 22 extern void abort (); 23 main()24int main() 25 { 26 if (foo(0) != 0 27 || foo(1) != 1 28 || bar(0) != 0 29 || bar(1) != 2 30 || bar(2) != 5) 31 abort (); 32 33 return 0; 34 } 35 36