https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92311
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Nichols A. Romero from comment #3) > Created attachment 47156 [details] > OpenMP equivalent to OpenACC detach/attach map(from:...) means the variable is allocated, but uninitialized on the device, but you are then reading the variables and expecting them to have meaningful values. IMHO you want map(from:check_sign) and map(to:...) for the other variables. Also, at least with GCC, for optimal performance when you offload to nvptx (and would use some larger array, 100 iterations this simple certainly isn't worth offloading), you want to use simd too, so target teams distribute parallel for simd (or in OpenMP 5.0 just target teams loop).