[Bug fortran/79247] Race condition on OpenMP reduction variable

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jan 26 19:49:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79247

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |jakub at gcc dot gnu.org
         Resolution|---                         |INVALID

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This is invalid testcase, please read e.g. OpenMP 4.5, 2.15.3.3 (reduction
clause is a privatization clause):
"Inside the construct, all references to the original list item are replaced by
references to the new list item. In the rest of the region, it is unspecified
whether references are to the new list item or the original list item."
You have no references to x in the construct, only in the region, therefore it
is unspecified if it accesses the original list item (therefore a race) or the
privatized variable.


More information about the Gcc-bugs mailing list