This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/79247] Race condition on OpenMP reduction variable
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 26 Jan 2017 19:49:13 +0000
- Subject: [Bug fortran/79247] Race condition on OpenMP reduction variable
- Auto-submitted: auto-generated
- References: <bug-79247-4@http.gcc.gnu.org/bugzilla/>
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.