https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47785
--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> --- Note the proposed solution only works for uniform -Wa options across all TUs participating in the optimizing link. Otherwise partitioning can merge parts of TUs with different flags and there is (IIRC) no way to annotate parts of an assembly file with different assembler flags. Supporting non-uniform -Wa flags would require either adjusting partitioning according to flags (disliked by some folks but also would help in other cases), or emitting multiple object files (assembler files) from a single LTRANS CU. Note there's the question if it is valid to inline across -Wa flag differences as well. For the specific case of -Wa,-msse2avx target maintainers might consider adding a -msse2avx compiler flag triggering the assembler flag via specs processing.