https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127589
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Tobias Burnus <[email protected]>: https://gcc.gnu.org/g:221d38405f99e5c51f26e09759e79aee482611fa commit r17-4657-g221d38405f99e5c51f26e09759e79aee482611fa Author: Tobias Burnus <[email protected]> Date: Fri Sep 25 17:10:55 2026 +0200 lto_input_mode_table: on offload targets, check whether mode is actually available [PR127589] For an offload-target compiler, the modes in the code match the modes on the host compiler - and not all modes might be available on the device side. There was already a check whether a mode was not existing at all, e.g. _Float128 are (currently?) unsupported on nvptx and amdgcn offload devices. However, for _Float16 ("HF") is more interesting: Both mentioned offload devices have support for it, but it is not enabled at runtime (amdgcn) or only sometimes (nvptx: only with -mexperimental for sm_53+ devices). Thus, an additional runtime check has been added for ACCEL_COMPILER, only to call the hook targetm.scalar_mode_supported_p to check whether the mode is actually available. And if not, an error message is printed. PR lto/127589 gcc/ChangeLog: * lto-streamer-in.cc (lto_input_mode_table): With ACCEL_COMPILER, check whether found float and int modes are actually enabled/available at runtime. libgomp/ChangeLog: * testsuite/libgomp.c/cmplxint-target-1.c: New test. * testsuite/libgomp.c/cmplxint128-target-1.c: New test. * testsuite/libgomp.c/dfp-target-1.c: New test. * testsuite/libgomp.c/float16-target-1.c: New test. * testsuite/libgomp.c/float16-target-2.c: New test.
