https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115026
Bug ID: 115026
Summary: msp430-elf fails gcc.dg/pr66444.c with prange enabled
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: aldyh at gcc dot gnu.org
Target Milestone: ---
This is a separate issue reported by Jeff in PR115009. I have reproduced on a
cross compiler.
Copied below is his report:
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.