This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/36801] config/cpu/generic/atomicity_mutex/atomicity.h incorrectly relies on global constructor ordering
- From: "bkoz at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Jul 2008 20:53:26 -0000
- Subject: [Bug libstdc++/36801] config/cpu/generic/atomicity_mutex/atomicity.h incorrectly relies on global constructor ordering
- References: <bug-36801-8116@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from bkoz at gcc dot gnu dot org 2008-07-11 20:53 -------
Hey Jonathan.
It would be most helpful if you could come up with a test case. I know, it will
be a pain and difficult, etc etc etc yadda yadda yadda, but really this would
be enormously helpful.
Instead of putting this back to the previous approach, I'd be more inclined to
use some kind of gthread_once approach. That's the usual approach that seems to
work well when used in locales where order-of-initialization has to be defined
with certainty, and in io, etc.
As this is present in the 4.2.x toolchain, we should probably adjust the bug
report to say this. I suspect this will only be fixed in the 4.3.x toolchain
though.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36801