https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115009
--- Comment #11 from Aldy Hernandez <aldyh at gcc dot gnu.org> --- (In reply to Jeffrey A. Law from comment #8) > 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. Hmmm, this may be something different. I can look at it tomorrow.