1 int main()2main () 3 { 4 int ah, bh, n = 1024; 5 #pragma omp target map(from: ah, bh) 6 { 7 int a, b; 8 #pragma omp simd lastprivate(b) 9 for (a = 0; a < n; a++) 10 { 11 b = a + n + 1; 12 asm volatile ("" : "+r"(b)); 13 } 14 ah = a, bh = b; 15 } 16 if (ah != n || bh != 2 * n) 17 __builtin_abort (); 18 } 19