I have NO clue how I've done this, but I do know that I exploit just about every compiler corner-case going, so I'm doing some pretty wierd things to begin with! Somehow, I've managed to break the compiler to the point where it starts doing this:
heap 367cbe0
With perfectly normal ternary operators:
printf("%d", i ? 6 : 7);
The exact assembly generated for that statement is:
;$exp
; line 3a
break ; eeec8
load.s.pri fffffffc
jzer 36b3
heap 367cbe0
const.pri 6
jump 36b4
l.36b3
heap a4
const.pri 7
l.36b4
heap 4
stor.i
move.pri
push.pri
;$par
const.pri 2d65e4
push.pri
;$par
push.c 8
sysreq.c 35 ; printf
stack c
heap fffffffc
heap ffffff5c
Clearly something has gone horribly wrong! I should note that this is in the 3.2.3664 compiler, so I was more wondering if this was a known bug that had been fixed as I couldn't find any references to it. I'll continue to try narrow down where the exact issue is, unfortunately at this point testing the problem on later compilers is very difficult, as I say I use a lot of corner-cases so my code isn't that portable. Quite WHY it chooses to do this I have no clue. I have no doubt that it is a result of some other code that somehow manages to break every ternary operator, because a stand-alone script with no silly libraries doesn't have this issue and generates these correctly.