This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]