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 tree-optimization/53436] Volatile behaves strange with OpenMP


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53436

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-05-22 10:01:11 UTC ---
What GCC did was wrong.  But your testcase is clearly invalid as per
OpenMP 3.1, 1.4.1:
"Similarly, if at least one thread reads from a memory unit and at least one
thread writes without synchronization to that same memory unit, including cases
due to atomicity considerations as described above, then a data race occurs. If
a data race occurs then the result of the program is unspecified."


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