https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104327
Bug ID: 104327 Summary: [12 Regression] Inlining error on s390x since r12-1039 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: jakub at gcc dot gnu.org Target Milestone: --- Since r12-1039-gebd5e86c0f41dc1d692f9b2b68a510b1f6835a3e we reject following testcase on s390x-linux (reduced from php): void foo (int *); static inline __attribute__((always_inline)) void bar (int *x) { foo (x); } __attribute__((cold, optimize("Os"))) void baz (int *x) { bar (x); } (with -O0 or -O2 etc.): rh2048565.c: In function ‘baz’: rh2048565.c:4:1: error: inlining failed in call to ‘always_inline’ ‘bar’: target specific option mismatch 4 | bar (int *x) | ^~~ rh2048565.c:12:3: note: called from here 12 | bar (x); | ^~~~~~~ target attribute isn't used at all though. Seems the mismatch is because the r12-1039 code sets DECL_FUNCTION_SPECIFIC_TARGET on the baz caller to non-NULL, while bar has it NULL.