https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111366
Kewen Lin <linkw at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Resolution|INVALID |--- Last reconfirmed| |2023-09-12 Status|RESOLVED |REOPENED --- Comment #12 from Kewen Lin <linkw at gcc dot gnu.org> --- (In reply to Kewen Lin from comment #9) > It looks to me that the error message is expected, because the source code > forces the function as always_inline, users would like it to be inlined > always, it's compiled with -mcpu=power10 as pragma function target > specifies, but the caller is compiled with -mcpu=power9 as command line > specifies, the caller doesn't have the full ISA capability over the callee, > it's unable to make inlining happen. Sorry, I just realized that I misread the function which the pragma is applied for (inverted the caller and the callee). It seems fine to make a caller with -mcpu=power10 to inline a callee with -mcpu=power9, but unfortunately Power10 drops HTM capability, it causes the mismatch. The issue should be gone with an extra -mno-htm. This issue is similar to PR102059, whose fix already takes care of some cases without actual htm feature uses. But it leaves inline asm alone, unfortunately the reduced test case here is using inline asm. One idea is to enhance the fix of PR102059 to further parse inline asm mnemonics.