Debian Codegraph @

gcc/testsuite/gcc.dg/crc-from-fedora-packages-4.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-fdump-tree-crc-details -O2" } */
3
4 // crc.ii
5 typedef unsigned int u32;
6
7 void GenerateCRC32Table (u32 polynomial, u32 *table)
8 {
9 for (u32 i = 0; i <= 255; i++)
10 {
11 u32 crc = i;
12 for (u32 j = 0; j < 8; j++)
13 {
14 crc = (crc >> 1) ^ ((crc & 1) ? 0x23428765 : 0);
15 }
16 table[i] = crc;
17 }
18 }
19
20
21 /* { dg-final { scan-tree-dump "calculates CRC!" "crc" } } */