According to https://github.com/SOLLVE/sollve_vv/issues/506 , LLVM has the following '-Wopenmp-target' warning. RFC: Add a similar warning to warn_omp_declare_target_after_first_use ? ( https://github.com/llvm/llvm-project/commit/729e242a7972f4802f982a4b4dabb964aa299675 ) warning: declaration marked as declare target after first use, it may lead to incorrect results [-Wopenmp-target] #pragma omp declare target link(a,b,c,i) for code like: int a[N], b[N], c[N]; int i = 0; void update() { for (i = 0; i < N; i++) { a[i] += 1; b[i] += 2; c[i] += 3; } } #pragma omp declare target #pragma omp declare target link(a,b,c,i) #pragma omp declare target to(update) #pragma omp end declare target