1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-17 00:29:31 +00:00

Add test showing optimizer failure, OptUnusedLoads removes needed loads

This commit is contained in:
Lauri Kasanen 2019-04-10 13:04:41 +03:00 committed by greg-king5
parent ac0b452834
commit f29220be1b

21
test/val/jmp-callax.c Normal file
View File

@ -0,0 +1,21 @@
static unsigned char val;
static void foo(void) {
val = 5;
}
static void wrap() {
asm("lda #<%v", foo);
asm("ldx #>%v", foo);
asm("jmp callax");
}
int main() {
val = 0;
wrap();
return val == 5 ? 0 : 1;
}