https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113780
Bug ID: 113780 Summary: [ARM] Incorrect indirect tailcall generated for PAC-enabled function. Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: belagod at gcc dot gnu.org Target Milestone: --- For this piece of code: void fail(void (*f)(int, int, int, int)) { f(1, 2, 3, 4); } compiled with -mcpu=cortex-m85 -mbranch-protection=pac-ret+leaf -O2 on trunk, it generates: fail: pac ip, lr, sp movs r3, #4 movs r2, #3 movs r1, #2 movs r0, #1 push {ip, lr} pop {ip, lr} aut ip, lr, sp bx ip @ indirect register sibling call