[Bug fortran/102698] omp atomic capture Abnormal results after running multiple times

2021-10-12 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102698 --- Comment #5 from Jakub Jelinek --- !$omp atomic capture v = x x = ior(x, expr) !$omp end atomic etc. is conceptually similar to !$omp atomic load v = x !$omp end atomic !$omp atomic update x = ior(x, expr) !$omp end atomic except that the cap

[Bug fortran/102698] omp atomic capture Abnormal results after running multiple times

2021-10-12 Thread han.wu--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102698 --- Comment #4 from han.wu --- Thank you very much for your prompt reply! @Jakub Jelinek One thing I don't quite understand is that if we modify the test case as suggested as the extra note, then the value of temp_v may vary at each execution, t

[Bug fortran/102698] omp atomic capture Abnormal results after running multiple times

2021-10-12 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102698 --- Comment #3 from Jakub Jelinek --- Just one extra note: !$omp atomic capture x(idx(i), idy(i)) = ior(x(idx(i), idy(i)), fun(i)) o(idx(i), idy(i)) = x(idx(i), idy(i)) !$omp end atomic is really (under the hood): temp_expr =

[Bug fortran/102698] omp atomic capture Abnormal results after running multiple times

2021-10-12 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102698 Jakub Jelinek changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug fortran/102698] omp atomic capture Abnormal results after running multiple times

2021-10-11 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102698 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0