Turn off new gcc tree-switch-conversion option in 16bit mode.
This option emits code which accesses global variables - it wont work
in 16bit mode.
diff --git a/Makefile b/Makefile
index 1df23b4..1cf7ba2 100644
--- a/Makefile
+++ b/Makefile
@@ -29,6 +29,7 @@
override CFLAGS = $(COMMONCFLAGS) -g -DMODE16=0
CFLAGS16INC = $(COMMONCFLAGS) -DMODE16=1 -fno-jump-tables -fno-defer-pop \
+ $(call cc-option,$(CC),-fno-tree-switch-conversion,) \
$(call cc-option,$(CC),--param large-stack-frame=4,)
CFLAGS16INC += -ffunction-sections -fdata-sections
CFLAGS16 = $(CFLAGS16INC) -g