https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117476
--- Comment #2 from David Binderman <dcb314 at hotmail dot com> ---
Partially reduced code:
void printf ();
void
platform_main_end(int crc)
{
printf ("checksum = %X\n", crc);
}
int crc32_tab[6];
int crc32_context = 4294967295;
void
crc32_byte (char b) {
crc32_context =
crc32_context >> 8 & 16777215 ^
crc32_tab[(crc32_context ^ b) & 255];
}
static void
transparent_crc (long val)
{
long __trans_tmp_1 = val;
{char b = val;
crc32_context =
crc32_context >> 8 & 16777215 ^
crc32_tab[(crc32_context ^ val) & 255];
}
;
crc32_byte (val>>8) ;
crc32_byte (val>>16) ;
crc32_byte (val>>24) ;
crc32_byte (val>>32) ;
crc32_byte (val>>40) ;
crc32_byte (val>>48) ;
crc32_byte (val>>56) ;
}
int g_2 ;
void main ()
{
{
int i, j;
i = 0;
for (i; i < 256; i++) {
unsigned crc = i;
j = 8;
for (j; j ; j--)
if (crc & 1)
crc = crc >> 1 ^ 3988292384;
else
crc >>= 1;
crc32_tab[i] = crc;
}
}
;
g_2 = -3;
transparent_crc(g_2);
platform_main_end(crc32_context ^ 4294967295);
}