Add test showing optimizer failure, OptUnusedLoads removes needed loads
This commit is contained in:
committed by
greg-king5
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;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user