https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96835
--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> --- (In reply to Tobias Weinzierl from comment #4) > Created attachment 49339 [details] > Reproducer Compiles here with mainline (11.0.0 20201104) and nvptx offloading (-O0). I wonder whether that was fixed by: OpenMP: Handle cpp_implicit_alias in declare-target discovery (PR96390) r11-3505-g2a10a2c0689db280ee3a94164504b7196b8370f4 Thus, I think the issue of comment 0 (the internal compiler error) is fixed and the automatic 'declare target' works now on mainline. However, the run-time JIT fails here (with and without 'omp declare target) – as in comment 3: libgomp: Link error log ptxas application ptx input, line 255; error : Label expected for argument 0 of instruction 'call' ptxas application ptx input, line 255; error : Function '_ZN6vectorILi4EEC1ERKi' not declared in this scope ^-- this is "vector<4>::vector(int const&)" ^-- and 'C1' means that it is the "complete object constructor" My bet is that this is the nvptx alias issue PR 97106 (see also PR 97102 and, regarding a newer PTX ISA PR96005). Solution: Either resolving the alias in GCC (in mkoffload) or (conditionally) bumping the minimal CUDA version to 10.0 such that .alias is available (PTX ISA >= 6.3).