https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119371
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> --- Bisecting points at the following commit - but that seems to rather reveal the issue and not causing it: r15-3135-gcb51e0b236c7d4 lto: Don't check obj.found for offload section obj.found is the number of LTO symbols. We should include the offload section when it is used by linker even if there are no LTO symbols. PR lto/116361 * lto-plugin.c (claim_file_handler_v2): Don't check obj.found for the offload section. (The commit needs an accompanying Binutils of mid 2024 for the full fix of PR116361; however, for this PR, Binutils 2.38 of 2022 seems to be new enough.) In particular, it turns out that without that commit, the offloading code is not detected at all. - Hence, it is not surprising that nvptx-lto1 does not fail if it is not executed at the first place...