Pelles C forum

Pelles C => Bug reports => Topic started by: frankie on October 28, 2023, 03:21:39 PM

Title: Compiler 64bits V12 bug on line "d->m_dict[TDEFL_LZ_DICT_SIZE + dst_pos] = c;"
Post by: frankie on October 28, 2023, 03:21:39 PM
Attached an offending sample project reduced to minimal
The line:
Code: [Select]
d->m_dict[TDEFL_LZ_DICT_SIZE + dst_pos] = c;Generate a compiler bug.
The workaround:
Code: [Select]
if (dst_pos < (TDEFL_MAX_MATCH_LEN - 1))
{
//d->m_dict[TDEFL_LZ_DICT_SIZE + dst_pos] = c; //Compiler failure line! Compiler BUG
int appo = TDEFL_LZ_DICT_SIZE + dst_pos;
d->m_dict[appo] = c;
}
The bug affects only the 64bits targets. 32bits targets aren't affected by the bug.