Implicit data mapping rules for scalars referenced within target region have been changed from “tofrom” to “firstprivate” in OpenMP 4.5. Libomptarget tests offload_success.c and offload_success.cpp rely on “tofrom” default and thus have to be updated to work correctly with OpenMP 4.5.
This change will make tests fail due to a problem in OpenMP runtime function omp_is_iniital_device (it returns true when called from the target code executed on device), but that is a separate issue which has to be addressed in OpenMP runtime library.