https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97070
--- Comment #5 from Ioannis E. Venetis <venetis at ceid dot upatras.gr> --- I am sorry for coming back to this and for the confusion, but my previous report of having solved the problem proved wrong. I was getting the correct result because the code was running on the CPU, not the GPU. After some more experimentation and setting GOMP_DEBUG=1 I am now certain that the code runs on the GPU, but the results are wrong for OpenACC. Hence, the problem remains.