Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.dg / pr65779.c
blob7d5c522d042e59582d920a7830e17f97d745ca3e
1 /* PR debug/65779 */
2 /* { dg-do assemble } */
3 /* { dg-options "-O2 -fcompare-debug" } */
5 unsigned long
6 foo (unsigned long x, unsigned char *y, unsigned int z)
8 unsigned long a = x & 0xffff;
9 unsigned long b = (x >> 16) & 0xffff;
10 int k;
11 if (y == 0) return 1L;
12 while (z > 0)
14 k = z < 5552 ? z : 5552;
15 z -= k;
16 while (k >= 16)
18 a += *y++; b += a;
19 a += *y++; b += a;
20 a += *y++; b += a;
21 a += *y++; b += a;
22 a += *y++; b += a;
23 a += *y++; b += a;
24 a += *y++; b += a;
25 a += *y++; b += a;
26 a += *y++; b += a;
27 a += *y++; b += a;
28 a += *y++; b += a;
29 a += *y++; b += a;
30 a += *y++; b += a;
31 a += *y++; b += a;
32 a += *y++; b += a;
33 a += *y++; b += a;
34 k -= 16;
36 if (k != 0)
37 do { a += *y++; b += a; } while (--k);
38 a %= 65521L;
39 b %= 65521L;
41 return (b << 16) | a;