This bug is not inside the compiler itself, but the ucSim.
ucSim does not handle "cpw x, (off, y)" correctly.
Though after applying my patch against rev9028, the bug is fixed, ucSim still does not support the following forms of CPW (as well as LDW)
CPW X,([$10.w],Y)
CPW Y,([$10.w],X)
CPW Y,([$1000.w],X)
Applied in revision #9031.
Philipp
Bug #2180 is fixed and this patch is merged into rev-9031. I will directly commit another potential bug fix to SVN later, with the support of stm8's indirect addressing in ucsim.