09-06-2015, 02:14 AM
Hi,
First, thanks for the compiler it's my first time playing with it.
I think I've found a nasty bug though.
A FOR loop that goes to 255 causes a hang in latest dev build 1.4.1964. Loops to 254 and 256 etc seem to work OK. It's my first time using the compiler so I don't know if it's a new problem or not. It seems to occur regardless of optimisation level.
A portion of the generated asm seems to assume the counter is word sized even though it's just a byte so that may be the problem:
I'm running python 2.7.6 btw.
Hope that's enough to investigate it...
Colm
First, thanks for the compiler it's my first time playing with it.
I think I've found a nasty bug though.
A FOR loop that goes to 255 causes a hang in latest dev build 1.4.1964. Loops to 254 and 256 etc seem to work OK. It's my first time using the compiler so I don't know if it's a new problem or not. It seems to occur regardless of optimisation level.
Code:
10 FOR n=1 TO 255
20 NEXT n
Code:
__LABEL0:
ld a, 255
ld hl, (_n - 1) <-- looks a bit dodgy
cp h
jp nc, __LABEL3
Hope that's enough to investigate it...
Colm