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

--- Comment #14 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot 
Uni-Bielefeld.DE> 2011-11-28 12:42:17 UTC ---
> --- Comment #13 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-11-26 
> 15:18:40 UTC ---
> Does this reduced test work with -std=gnu++11 -pthread ?

Unfortunately not, I still get

22 : Invalid argument

Only if I add an explicit call to pthread_mutex_init does the testcase
work.

I've no real idea why this happens.  pthread_mutex_init(3) states

  Use the PTHREAD_MUTEX_INITIALIZER macro to statically initialize a mutex
  without calling this routine. Statically initialized mutexes need not be
  destroyed using pthread_mutex_destroy(3). Use this macro as follows:

  pthread_mutex_t mutex= PTHREAD_MUTEX_INITIALIZER

  Only normal mutexes can be statically initialized.

While I do have Tru64 UNIX sources, libpthread is only partially
included and the implementation of pthread_mutex_lock is missing.

    Rainer

Reply via email to