If you mention (accidentally) a variable twice in an OMP 4.0 target update clause icc 14.0.2 will not detect this and instead ignore it.
Sample Code:
#include <stdio.h>
#include <stdlib.h>
#pragma omp declare target
int x,y;
#pragma omp end declare target
int main (int argc, char *argv[]) {
x = 4;
y = 5;
#pragma omp target update to(x,y)
#pragma omp target
printf("4=%d 5=%d\n",x,y);
x = 8;
y = 9;
#pragma omp target update to(y,x,y)
#pragma omp target
printf("8=%d 9=%d\n",x,y); //Output is "8=8 9=5" (!!!!)
return EXIT_SUCCESS;
}See the 2nd printf.
This just caused me a lot of trouble as I had a huge update statement with one duplicate variable which silently messed up the whole program.
Please make this an error!