[Bug c++/99509] [OpenMP] 'omp declare target' for global variable → "hasn't been marked to be included in the offloaded code"
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Mar 10 11:37:55 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99509
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Tobias Burnus from comment #1)
> But with cc it fails with:
>
> unresolved symbol foo
> mkoffload: fatal error: ...
For C99 and later you'd need either static inline, or extern inline, inline
means the compiler can use the body but that the definition is provided
somewhere else if it is not inlined.
More information about the Gcc-bugs
mailing list