https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64318
Paolo Carlini changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64318
--- Comment #5 from Jonathan Wakely ---
The original testcase does indeed have a data race. The revised testcase is
valid.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64318
--- Comment #4 from zhouyan at me dot com ---
The new example can be unsafe, if the constructor of the two classes are
unsafe. However, I went through the source of before (during 4.8, 4.9
release), unless something changed, it's not the case.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64318
--- Comment #3 from zhouyan at me dot com ---
Here is version that shall be thread-safe, that produce the same problem,
#include
int main ()
{
_Cilk_for (int i = 0; i != 1; ++i) {
std::mt19937 eng(i);
std::normal_distrib
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64318
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64318
--- Comment #1 from zhouyan at me dot com ---
I forgot to mention that, the system is CentOS 7 (with all updates)