https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68705

vries at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from vries at gcc dot gnu.org ---
(In reply to vries from comment #0)
> It initializes shared variable num_threads. This num_threads variable is
> used by all threads subsequently, but there doesn't seem to be a mechanism
> present that guarantees that the initialization by thread 0 is done before
> any other thread reads the value ().

Actually there is synchronization. The non-0 threads go into a waiting loop,
before reading num_thread, and the 0 thread writes the num_threads variable and
subsuquently enables the non-0 thread to exit the waiting loop.

Marking resolved-invalid.

Reply via email to