[Bug middle-end/26461] liveness of thread local references across function calls

gpderetta at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Mar 8 11:39:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26461

--- Comment #11 from Giovanni Deretta <gpderetta at gmail dot com> ---
In the last few years it has been clear that threads are not enough and
coroutines have seen a resurgence in many languages. Go, which is directly
supported by GCC, make them a first class construct; boost has had them for a
while (and it is affecte by this issue); the HPX library uses them to great
effects for HPC work; it even seem that C++ standard will eventually include
them officially [1].

Any chance this resolution will be reviewed? 

Note that an opt-in flag would be enough, and it should have very little effect
on x86, where the compiler doesn't bother to cache TLS address computations, as
it has fast TLS access, unless the address is explicitly taken.

[1] If MS get it its way, stackless coroutines shouldn't be affected by this
issue as the switch point can be statically identified by the compiler. But
there is still a chance that we will get proper non-crippled stackfull
coroutines.


More information about the Gcc-bugs mailing list