This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/43170] gcc 4.5 20100218 bootstrap compare fails on os x 10.6
- From: "rwild at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Jun 2010 17:04:57 -0000
- Subject: [Bug bootstrap/43170] gcc 4.5 20100218 bootstrap compare fails on os x 10.6
- References: <bug-43170-14181@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #39 from rwild at gcc dot gnu dot org 2010-06-02 17:04 -------
Can you (someone with darwin) just take the configure test from comment #13,
build it, and run it under various load on your system, to see whether it
produces unstable results with a compiler from the previous stage? Thanks.
Just to be sure, this is not just about the a_in_other_thread pointer lacking a
volatile qualifier, or use of proper exclusion primitive?
Here's the source again, for reference:
#include <pthread.h>
__thread int a;
static int *a_in_other_thread;
static void *
thread_func (void *arg)
{
a_in_other_thread = &a;
return (void *)0;
}
int
main ()
{
pthread_t thread;
void *thread_retval;
int *a_in_main_thread;
if (pthread_create (&thread, (pthread_attr_t *)0,
thread_func, (void *)0))
return 0;
a_in_main_thread = &a;
if (pthread_join (thread, &thread_retval))
return 0;
return (a_in_other_thread == a_in_main_thread);
;
return 0;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43170