https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97436
Bug ID: 97436 Summary: [nvptx] -m32 support Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: vries at gcc dot gnu.org Target Milestone: --- The nvptx port has an -m32 switch: ... m32 Target Report RejectNegative InverseMask(ABI64) Generate code for a 32-bit ABI. ... but the default is -m64: ... #define TARGET_DEFAULT_TARGET_FLAGS MASK_ABI64 ... [ which perhaps should be related to the host being -m64 or -m32? ] We're not building -m32/-m64 multilibs, so it seems we're not building the -m32 part by default. I don't know if the -m32 path was ever tested, either in standalone or offloading setting. But since the switch is there, we should either build and test or deprecate it. I'm not yet sure what would be a working setup in terms of card/drivers/OS. At least for linux, at cuda 7.5 it's mentioned that: "Support for developing and running 32-bit CUDA and OpenCL applications on 64-bit x86 Linux platforms is deprecated". And with cuda 8.0, I get: ... $ ~/cuda/8.0/bin/nvcc ~/hello.cu -m32 nvcc warning : Compiling in the 32-bit mode when the host compiler targets x86 or x86_64 is no longer supported on Linux ...