------- Comment #6 from hjl dot tools at gmail dot com 2010-08-16 05:18 ------- -mtune=i586 miscompiled gomp_barrier_handle_tasks which has a loop and calls:
static inline void gomp_mutex_lock (gomp_mutex_t *mutex) { if (!__sync_bool_compare_and_swap (mutex, 0, 1)) gomp_mutex_lock_slow (mutex); } setcc was moved out of loop. But for multi-thread applications, __sync_bool_compare_and_swap may change CC even if current thread doesn't change anything. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45292