On Tue, Mar 26, 2019 at 03:42:09PM -0700, Kevin Buettner wrote: > libgomp/ChangeLog: > > * team.c (gomp_team_start): Initialize pool->threads[0]. > > diff --git a/libgomp/team.c b/libgomp/team.c > index 2b2e9750da5..c422da3701d 100644 > --- a/libgomp/team.c > +++ b/libgomp/team.c > @@ -482,6 +482,8 @@ gomp_team_start (void (*fn) (void *), void *data, > unsigned nthreads, > = gomp_realloc (pool->threads, > pool->threads_size > * sizeof (struct gomp_thread *)); > + /* Add current (master) thread to threads[]. */ > + pool->threads[0] = thr; > } > > /* Release existing idle threads. */
Ok for trunk, let's deal with nested threads in a follow-up. Jakub