PR tree-optimization/83369 - Missing diagnostics during inlining
[official-gcc.git] / gcc / testsuite / gcc.dg / pr39794.c
blob2702ba79ae673b66f01361359c6da4445e2860e8
1 /* PR rtl-optimization/39794 */
2 /* { dg-do run } */
3 /* { dg-options "-O2 -funroll-loops" } */
5 extern void abort ();
7 void
8 foo (int *a, int n)
10 int i;
11 for (i = 0; i < n; i++)
13 a[i] *= 2;
14 a[i + 1] = a[i - 1] + a[i - 2];
18 int a[16];
19 int ref[16] = { 0, 1, 4, 2, 10, 12, 24, 44,
20 72, 136, 232, 416, 736, 1296, 2304, 2032 };
22 int
23 main ()
25 int i;
26 for (i = 0; i < 16; i++)
27 a[i] = i;
28 foo (a + 2, 16 - 3);
29 for (i = 0; i < 16; i++)
30 if (ref[i] != a[i])
31 abort ();
32 return 0;