------- Comment #1 from redi at gcc dot gnu dot org  2010-03-04 17:44 -------
The problematic line expands to:

  static pthread_mutex_t __global_lock(PTHREAD_MUTEX_INITIALIZER);

which is clearly wrong when PTHREAD_MUTEX_INITIALIZER is of the form {...}

As you suggest, it should be using gthreads, but a simpler fix for now would be
to avoid using _GLIBCXX_PROFILE_DEFINE_DATA and declare __get___global_lock
directly in profiler_trace.h, something like:

inline __mutex_t& __get___global_lock() {
  static __mutex_t __global_lock = PTHREAD_MUTEX_INITIALIZER;
  return __global_lock;
}


-- 


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

Reply via email to