https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100573
--- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #5) > I think we want to fix both for-3.c and for-9.c similarly to > r11-2571-g916c7a201a9a1dc94f2c056a773826a26d1daca9 i.e. > #define DO_PRAGMA(x) _Pragma (#x) > #define OMPTEAMS DO_PRAGMA (omp target teams) > #define OMPFROM(v) DO_PRAGMA (omp target update from(v)) > #define OMPTO(v) DO_PRAGMA (omp target update to(v)) > and changing main not to do #pragma omp target teams reduction(|:err) When trying this, it (still) works as host fallback but offloading gives: 219 | OMPTO (a); for-2.h:219:1: error: variable '.omp_data_kinds.116' has been referenced in offloaded code but hasn't been marked to be included in the offloaded code 222 | OMPFROM (a); for-2.h:222:1: error: variable '.omp_data_sizes.118' has been referenced in offloaded code but hasn't been marked to be included in the offloaded code (And likewise for additional OMPTO/OMPFROM.)