[Bug middle-end/54129] emulated __thread variables and pthread_*specific data

2012-07-30 Thread blucia at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54129 --- Comment #6 from blucia at gmail dot com 2012-07-30 21:00:56 UTC --- Thanks for pointing out where that code is. I still think this is weird (i.e., possibly a bug) for two reasons: 1)Differs from Linux behavior. I'm sure lots of things differ

[Bug middle-end/54129] emulated __thread variables and pthread_*specific data

2012-07-30 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54129 --- Comment #5 from Andrew Pinski 2012-07-30 20:50:21 UTC --- >Where is the code in the destructor for the __thread variables? in libgcc/emutls.c . The code is: static void emutls_destroy (void *ptr) { struct __emutls_array *arr = ptr; poi

[Bug middle-end/54129] emulated __thread variables and pthread_*specific data

2012-07-30 Thread blucia at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54129 --- Comment #4 from blucia at gmail dot com 2012-07-30 20:40:31 UTC --- I don't really see your point. Where is the code in the destructor for the __thread variables? For the pthread_key_create vars, I wrote down what I want to do to the data, an

[Bug middle-end/54129] emulated __thread variables and pthread_*specific data

2012-07-30 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54129 --- Comment #3 from Andrew Pinski 2012-07-30 20:29:05 UTC --- > In my program, only one destructor function exists. Yes in your source only has one but the code really there is two. One for the __thread implementation and one you have in your

[Bug middle-end/54129] emulated __thread variables and pthread_*specific data

2012-07-30 Thread blucia at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54129 --- Comment #2 from blucia at gmail dot com 2012-07-30 20:25:52 UTC --- The man page for pthread_key_create says: "An optional destructor function may be associated with each key value. ... The order of destructor calls is unspecified if more th

[Bug middle-end/54129] emulated __thread variables and pthread_*specific data

2012-07-30 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54129 Andrew Pinski changed: What|Removed |Added Component|c |middle-end Summary|__thread va