https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115009
--- Comment #8 from Jeffrey A. Law <law at gcc dot gnu.org> --- And on msp430-elf we're getting a codegen correctness issue on msp430-elf. gcc.dg/pr66444.c fails in the simulator. The -O2 code difference looks like: *** good.s Thu May 9 20:41:37 2024 --- bad.s Thu May 9 20:41:44 2024 *************** baz: *** 73,81 **** ; saved regs:(none) ; start of prologue ; end of prologue ! MOV.W #2062, R12 CALL #fn1 ! MOV.W #2062, R12 CALL #fn2 MOV.B #0, R12 ; start of epilogue --- 73,81 ---- ; saved regs:(none) ; start of prologue ; end of prologue ! MOV.B #0, R12 CALL #fn1 ! MOV.B #0, R12 CALL #fn2 MOV.B #0, R12 ; start of epilogue We're mucking up the pointer that baz() passes down to fn1 and fn2 I think.