Add new test to verify that the array index, limit, and stride are
[official-gcc.git] / gcc / testsuite / gcc.dg / pr51990.c
blobc7d1b53798557b7911fe91edca117a98d25cb8aa
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
4 int
5 zzz (char *s1, char *s2, int len, int *q)
7 int z = 5;
8 unsigned int i, b;
9 struct s { char a[z]; };
10 struct s x;
12 extern int foo (int, ...) __attribute__((pure));
14 for (i = 0; i < len; i++)
15 s1[i] = s2[i];
17 b = z & 0x3;
19 len += (b == 0 ? 0 : 1) + z;
21 *q = len;
22 return foo (z, x, x);