https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96493
Bug ID: 96493 Summary: powerpc local call linkage failure Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: amodra at gmail dot com Target Milestone: --- /* -O2 -mcpu=power8 */ static int __attribute__ ((target("cpu=power10"),noclone,noinline)) local_func (int x) { return x; } int main() { return local_func (0); } results in a linker complaint "call to `local_func' lacks nop, can't restore toc; (toc save/adjust stub)". rs6000.md call_local et al patterns can't be allowed to match when caller/callee disagree about r2 usage.