Forum
SHIFT bug (*solved*) - Printable Version

+- Forum (https://www.boriel.com/forum)
+-- Forum: Compilers and Computer Languages (https://www.boriel.com/forum/forumdisplay.php?fid=12)
+--- Forum: ZX Basic Compiler (https://www.boriel.com/forum/forumdisplay.php?fid=11)
+---- Forum: Bug Reports (https://www.boriel.com/forum/forumdisplay.php?fid=15)
+---- Thread: SHIFT bug (*solved*) (/showthread.php?tid=698)



SHIFT bug (*solved*) - einar - 08-25-2015

Try this:
Code:
DIM a AS UBYTE = 3
DIM b AS UBYTE = 2

PRINT a << (3-b)
Attempting to compile this program using latest ZX BASIC version 1.4.0s1953 will produce this error:

Code:
Error: Undefined label '__LABEL0'
It will only compile correctly if you disable compiler optimizations using "-O 1".

Previous ZX BASIC version 1.4.0s1935 was able to compile this correctly at any optimization level.


Re: SHIFT bug - boriel - 08-29-2015

Another bug due to the update after 1935.
Can you download ZX BASIC 1.4.0s1964 and test it, please? :roll:


Re: SHIFT bug - einar - 09-04-2015

It works now, thank you!