https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105000
Bug ID: 105000 Summary: __attribute__((target("no-sse"))) doesn't disable AVX/SSE ISAs in ix86_isa_flags2 Product: gcc Version: 11.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: hjl.tools at gmail dot com CC: crazylht at gmail dot com Target Milestone: --- Target: x86-64 [hjl@gnu-tgl-3 gcc]$ cat /tmp/x.c #include <x86gprintrin.h> __attribute__((target("no-mmx,no-sse"))) int foo () { return _get_ssp (); } [hjl@gnu-tgl-3 gcc]$ ./xgcc -B./ -S -O2 x.c -mshstk -mavxvnni x.c: In function ‘foo’: x.c:5:1: error: inlining failed in call to ‘always_inline’ ‘_get_ssp’: target specific option mismatch 5 | _get_ssp (void) | ^~~~~~~~ x.c:15:10: note: called from here 15 | return _get_ssp (); | ^~~~~~~~~~~ [hjl@gnu-tgl-3 gcc]$ ./xgcc -B./ -S -O2 x.c -mshstk -mkl x.c: In function ‘foo’: x.c:5:1: error: inlining failed in call to ‘always_inline’ ‘_get_ssp’: target specific option mismatch 5 | _get_ssp (void) | ^~~~~~~~ x.c:15:10: note: called from here 15 | return _get_ssp (); | ^~~~~~~~~~~ [hjl@gnu-tgl-3 gcc]$ Is is because __attribute__((target("no-sse"))) doesn't disable AVX/SSE ISAs in ix86_isa_flags2.