| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-fdump-tree-crc-details -O2" } */ |
| 3 |
/* { dg-require-effective-target int32plus } */ |
| 4 |
|
| 5 |
// File - 3way.cpp. Modified |
| 6 |
typedef unsigned int word32; |
| 7 |
word32 ProcessAndXorBlock () |
| 8 |
{ |
| 9 |
word32 a0, a1, a2; |
| 10 |
word32 START_D = 0xb1b1; |
| 11 |
word32 rc = START_D; |
| 12 |
unsigned int m_rounds = 32; |
| 13 |
for(unsigned i=0; i<m_rounds; i++) |
| 14 |
{ |
| 15 |
//... |
| 16 |
rc <<= 1; |
| 17 |
if (rc&0x10000) rc ^= 0x11011; |
| 18 |
} |
| 19 |
return rc; |
| 20 |
} |
| 21 |
|
| 22 |
/* { dg-final { scan-tree-dump "Polynomial's all bits are zeros or the size of the polynomial is uncertain." "crc" } } */ |
| 23 |
/* { dg-final { scan-tree-dump "maybe contains CRC calculation." "crc" } } */ |