[Bug libgomp/49345] New: Proper casting needed when assigning '-1' to unsigned variables.

2011-06-09 Thread shreyasp at ti dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49345

   Summary: Proper casting needed when assigning '-1' to unsigned
variables.
   Product: gcc
   Version: 4.5.1
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: libgomp
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: shrey...@ti.com


The TI compiler throws warnings when compiling the following code in ordered.c:

  /* We're no longer the owner.  */
  ws->ordered_owner = -1;

This should be changed to:

  /* We're no longer the owner.  */
  ws->ordered_owner = (unsigned)-1;

since 'ordered_owner' is an unsigned integer.

There are three occurrences of this in ordered.c. 

Thanks,
Shreyas


[Bug libgomp/45240] parallel.c: GOMP_parallel_end locks a mutex but fails to unlock it after atomic operation complete

2010-12-01 Thread shreyasp at ti dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45240

Shreyas Prasad  changed:

   What|Removed |Added

   Severity|normal  |major


[Bug libgomp/45240] New: parallel.c: GOMP_parallel_end locks a mutex but fails to unlock it after atomic operation complete

2010-08-09 Thread shreyasp at ti dot com
In parallel.c, if HAVE_SYNC_BUILTINS is #undef'ed, then GOMP_parallel_end uses
a mutex to atomically modify the team->nthreads field.  The mutex that is used
to atomically write to nthreads is locked but never unlocked.

parallel.c, GOMP_parallel_end:

#ifdef HAVE_SYNC_BUILTINS
  __sync_fetch_and_add (&gomp_remaining_threads_count,
1UL - team->nthreads);
#else
  gomp_mutex_lock (&gomp_remaining_threads_lock);
  gomp_remaining_threads_count -= team->nthreads - 1;
#endif


-- 
   Summary: parallel.c: GOMP_parallel_end locks a mutex but fails to
unlock it after atomic operation complete
   Product: gcc
   Version: 4.5.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libgomp
AssignedTo: unassigned at gcc dot gnu dot org
    ReportedBy: shreyasp at ti dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45240