Commit b6b561e4 by John David Anglin Committed by John David Anglin

re PR testsuite/35677 (Intermitent failure "FAIL: libgomp.fortran/crayptr2.f90")

	PR testsuite/35677
	* emutls.c (__emutls_get_address): Make sure offset is really zero
	before initializing the object's offset.

From-SVN: r142687
parent 150da9f4
2008-12-11 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR testsuite/35677
* emutls.c (__emutls_get_address): Make sure offset is really zero
before initializing the object's offset.
2008-12-11 Jakub Jelinek <jakub@redhat.com>
PR c++/38253
......@@ -147,8 +147,12 @@ __emutls_get_address (struct __emutls_object *obj)
static __gthread_once_t once = __GTHREAD_ONCE_INIT;
__gthread_once (&once, emutls_init);
__gthread_mutex_lock (&emutls_mutex);
offset = ++emutls_size;
obj->loc.offset = offset;
offset = obj->loc.offset;
if (offset == 0)
{
offset = ++emutls_size;
obj->loc.offset = offset;
}
__gthread_mutex_unlock (&emutls_mutex);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment