https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117476
--- Comment #5 from David Binderman <dcb314 at hotmail dot com> ---
(In reply to Sam James from comment #3)
> Please reduce with something like: -Werror=uninitialized
> -Werror=aggressive-loop-optimizations -Werror=sequence-point.
Thanks. Second try:
void printf ();
void
platform_main_end(int crc)
{
printf ("checksum = %X\n", crc);
}
int crc32_tab[256];
int crc32_context = 0xFFFFFFFFUL;
void
crc32_gentab ()
{
int i, j;
for (i = 0; i < 256; i++) {
unsigned crc = i;
for (j = 8; j ; j--)
if (crc & 1)
crc = (crc >> 1) ^ 0xEDB88320UL;
else
crc >>= 1;
crc32_tab[i] = crc;
}
}
void
crc32_byte (char b) {
crc32_context =
((crc32_context >> 8) & 0x00FFFFFF) ^
crc32_tab[(crc32_context ^ b) & 0xFF];
}
static void
transparent_crc (long val)
{
{
long __trans_tmp_1 = val;
{
crc32_byte ((__trans_tmp_1) );
crc32_byte ((__trans_tmp_1>>8) );
crc32_byte ((__trans_tmp_1>>16) );
crc32_byte ((__trans_tmp_1>>24) );
crc32_byte ((__trans_tmp_1>>32) );
crc32_byte ((__trans_tmp_1>>40) );
crc32_byte ((__trans_tmp_1>>48) );
crc32_byte ((__trans_tmp_1>>56) );
}}
}
int g_2 ;
void main ()
{
crc32_gentab();
{
g_2 = (-3);
}
transparent_crc(g_2);
platform_main_end(crc32_context ^ 0xFFFFFFFFUL);
}