Patch for PR libgomp/37938, IA64 specific.

Steve Ellcey sje@cup.hp.com
Thu Nov 6 21:05:00 GMT 2008


On Thu, 2008-11-06 at 11:09 -0800, H.J. Lu wrote:

> There are
> 
> libgomp/critical.c:static gomp_mutex_t default_lock;
> libgomp/critical.c:static gomp_mutex_t create_lock_lock;
> libgomp/critical.c:  gomp_mutex_t *plock;
> libgomp/critical.c:      && sizeof (gomp_mutex_t) <= sizeof (void *)
> libgomp/critical.c:      && __alignof (gomp_mutex_t) <= sizeof (void *))
> libgomp/critical.c:    plock = (gomp_mutex_t *)pptr;
> libgomp/critical.c:	  gomp_mutex_t *nlock = gomp_malloc (sizeof (gomp_mutex_t));
> libgomp/critical.c:	      plock = gomp_malloc (sizeof (gomp_mutex_t));
> libgomp/critical.c:  gomp_mutex_t *plock;
> libgomp/critical.c:      && sizeof (gomp_mutex_t) <= sizeof (void *)
> libgomp/critical.c:      && __alignof (gomp_mutex_t) <= sizeof (void *))
> libgomp/critical.c:    plock = (gomp_mutex_t *)pptr;
> libgomp/critical.c:static gomp_mutex_t atomic_lock;
> 
> Those reads look suspicious.

I am not sure what reads you mean.  Do you mean the 'plock =
(gomp_mutex_t *) pptr' statements? The sizeof and __alignof uses are not
reads, right?  But pptr is a pointer to mutex and not a mutex itself, so
reading pptr shouldn't be a problem.

Steve Ellcey
sje@cup.hp.com



More information about the Gcc-patches mailing list