1 /* PR middle-end/86660 */ 2 3 #pragma omp declare target 4 int v[20]; 5 6 void foo(void)7foo (void) 8 { 9 if (v[7] != 2) 10 __builtin_abort (); 11 v[7] = 1; 12 } 13 #pragma omp end declare target 14 15 int main()16main () 17 { 18 v[5] = 8; 19 v[7] = 2; 20 #pragma omp target map (always, tofrom: v) 21 { 22 foo (); 23 v[5] = 3; 24 } 25 if (v[7] != 1 || v[5] != 3) 26 __builtin_abort (); 27 return 0; 28 } 29