Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / pr43236.c
blob0401c88a3dcc27974ea03bba8d2fc2922db9b637
1 /* { dg-options "-ftree-loop-distribution" } */
2 extern void abort(void);
3 extern void *memset(void *s, int c, __SIZE_TYPE__ n);
4 extern int memcmp(const void *s1, const void *s2, __SIZE_TYPE__ n);
5 /*extern int printf(const char *format, ...);*/
7 int main()
9 char A[30], B[30], C[30];
10 int i;
12 /* prepare arrays */
13 memset(A, 1, 30);
14 memset(B, 1, 30);
16 for (i = 20; i-- > 10;) {
17 A[i] = 0;
18 B[i] = 0;
21 /* expected result */
22 memset(C, 1, 30);
23 memset(C + 10, 0, 10);
25 /* show result */
26 /* for (i = 0; i < 30; i++)
27 printf("%d %d %d\n", A[i], B[i], C[i]); */
29 /* compare results */
30 if (memcmp(A, C, 30) || memcmp(B, C, 30)) abort();
31 return 0;