https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90591
--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> --- Somewhat related: In terms of OpenMP (to be refined in the spec), the following applies (in order to work both with shared + nonshared memory): int x = 5; #pragma omp target map(from:x) x = 7; printf("%f\n", x); This code is invalid – which means that the compiler could use this for optimization and it probably should warn that "x" is used uninitialized.