https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89456
Bug ID: 89456 Summary: target attribute doesn't work well with -march=native Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: hjl.tools at gmail dot com Target Milestone: --- Target: i386,x86-64 -march=native is expanded to -march=xxx -myyy -mno-zzz. Whe compiling int __attribute__ ((target("arch=broadwell"))) foo () { return 13; } arch=broadwell won't set x_ix86_isa_flags since x_ix86_isa_flags_explicit has been set via command line. As the result, all_ix86_isa_flags checks in get_builtin_code_for_version will be wrong.