mirror of
https://github.com/cc65/cc65.git
synced 2025-02-20 14:29:03 +00:00
Add test showing optimizer failure, OptUnusedLoads removes needed loads
This commit is contained in:
parent
ac0b452834
commit
f29220be1b
21
test/val/jmp-callax.c
Normal file
21
test/val/jmp-callax.c
Normal 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;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user