1 /* Duff's device is legal C; test to make sure the compiler
2 doesn't complain about it.
4 Roger Sayle <roger@eyesopen.com>
5 Derived from duff-2.c. */
8 /* { dg-options "-O2" } */
10 extern void abort (void);
11 extern void exit (int);
13 #if __INT_MAX__ >= 2147483647
14 /* At least 32-bit integers. */
21 cksum (const unsigned char *src
, unsigned long size
)
30 ck
^= (type32
)*src
++ << 24;
33 ck
^= (type32
)*src
++ << 16;
36 ck
^= (type32
)*src
++ << 8;
48 const char testpat
[] = "The quick brown fox jumped over the lazy dog.";
55 ck
= cksum ((const unsigned char *) testpat
, sizeof (testpat
));