PR c++/82069 - ICE with lambda in template
[official-gcc.git] / gcc / testsuite / gcc.dg / pr69195.c
blobaf373a1223ed57436ef0d25267670e4a7f694cdf
1 /* { dg-do run } */
2 /* { dg-options "-O3 -fno-dce -fno-forward-propagate" } */
4 void __attribute__ ((noinline, noclone))
5 foo (int *a, int n)
7 int *lasta = a + n;
8 for (; a != lasta; a++)
10 *a *= 2;
11 a[1] = a[-1] + a[-2];
15 int
16 main ()
18 int a[16] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
19 int r[16] = { 1, 2, 6, 6, 16, 24, 44, 80,
20 136, 248, 432, 768, 1360, 2400, 4256, 3760 };
21 unsigned i;
22 foo (&a[2], 13);
23 for (i = 0; i < 8; ++i)
24 if (a[i] != r[i])
25 __builtin_abort ();
26 return 0;