Debian Codegraph @

gcc/testsuite/gcc.dg/crc-not-crc-9.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-fdump-tree-crc -O2" } */
3
4 #include <stdint.h>
5 //no conditional xor
6 uint16_t not_crc(uint16_t crc, uint8_t a) {
7 int i;
8 crc ^= a;
9 for (i = 0; i < 8; ++i) {
10 crc = (crc << 1) ^ 0xA001;
11 }
12 return crc;
13 }
14
15 /* { dg-final { scan-tree-dump-times "not_crc function maybe contains CRC calculation" 0 "crc" } } */
16