Add new test to verify that the array index, limit, and stride are
[official-gcc.git] / gcc / testsuite / gcc.dg / pr42629.c
bloba5eeb0cc1ec444008b03e7fe67f5a2cfc396070a
1 /* This failed -fcompare-debug because register pressure computation
2 took debug insns into account. */
3 /* { dg-do compile } */
4 /* { dg-options "-O1 -fsched-pressure -fschedule-insns -fcompare-debug" } */
5 /* { dg-require-effective-target int32plus } */
6 /* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
8 int lzo_adler32(int adler, char *buf)
10 int s1 = adler;
11 int s2 = adler;
12 s1 += buf[0];
13 s2 += s1;
14 s1 += buf[1];
15 s2 += s1;
16 s1 += buf[2];
17 s2 += s1;
18 s1 += buf[3];
19 s2 += s1;
20 s1 += buf[4];
21 s2 += s1;
22 s1 += buf[5];
23 s2 += s1;
24 s1 += buf[6];
25 s2 += s1;
26 s1 += buf[7];
27 s2 += s1;
28 return (s2 << 16) + s1;