https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57703
--- Comment #10 from Alexander Monakov <amonakov at gcc dot gnu.org> --- Bug 64420, which was marked as a duplicate, presents an example where there's no diagnostics at build time (linking succeeds), but the resulting code is wrong and will fail at runtime. I believe the correct fix would be to disable LTO partitioning in a TU that contains top-level asms (but in that TU only). Is there something wrong with such approach?