Debian Codegraph @

gcc/testsuite/g++.dg/opt/unroll2.C

raw
1 // PR tree-opt/28937
2 // Complete unroll forgot to update the statement usage
3 // which meant we ICEd in add_virtual_operand.
4
5 // { dg-do compile }
6 // { dg-options "-O2" }
7
8
9 class SHA256
10 {
11 unsigned m_digest;
12 unsigned long long m_count;
13 unsigned char _buffer[64];
14 static void Transform (unsigned * data);
15 void WriteByteBlock (unsigned t);
16 };
17 void SHA256::WriteByteBlock (unsigned t)
18 {
19 unsigned data32[16];
20 Transform (data32);
21 unsigned long long lenInBits = m_count;
22 if (t != (64 - 8))
23 return;
24 for (int i = 0; i < 2; i++)
25 _buffer[t++] = (unsigned char)lenInBits;
26 }
27