This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/26461] liveness of thread local references across function calls
- From: "yichen dot xie at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Feb 2006 01:55:59 -0000
- Subject: [Bug middle-end/26461] liveness of thread local references across function calls
- References: <bug-26461-12263@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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