------- Comment #6 from yichen dot xie at gmail dot com 2006-02-25 01:55 ------- (In reply to comment #5) > ISO C is not your normal low level language any more. It actually tries to be > a high level language. > > So this is not a bug. >
I still don't think it's a good idea to treat thread local array addresses as invariant. If you look at the implementation of getcontext/swapcontext, they intentionally left gs segment register out in the context, leaving open the possibility that a context saved by one thread be resumed by another. What will gcc do in this case? If you don't mind, could you point me to the section of ISO C where it specifies that function calls must preserve thread contexts? If not, by all means it's a bug in the optimizer. Does any one else have an opinion? -- yichen dot xie at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|INVALID | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26461