https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96833
Bug ID: 96833 Summary: Functors within target offload code Product: gcc Version: 9.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: tobias.weinzierl at durham dot ac.uk Target Milestone: --- I cannot declare a function #pragma omp declare target void foo( std::function<void()> x ) { ... even though x is, whenever I use it, declared as offloadable, too. The workaround is to make foo a template. It then works. Is this on purpose or a bug?