This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/68718] libgomp c.exp with -fipa-pta hang in sort-1.c
- 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: Mon, 07 Dec 2015 10:05:17 +0000
- Subject: [Bug tree-optimization/68718] libgomp c.exp with -fipa-pta hang in sort-1.c
- Auto-submitted: auto-generated
- References: <bug-68718-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68718
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
omp_set/unset_lock of course is a memory barrier. All the problematic
variables (it is not just busy, but also global_stack.top) are only modified
when guarded with the lock, the problem is just read data races - those vars
are read outside of the lock occassionally. libgomp itself (and other
libraries) had such code quite often in the past, that has been changed a few
years ago especially when ppc64 started to see issues, but also when
-fsanitize=thread has been added.
This testcase just needs the same treatment.