This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/27692] FAIL: g++.old-deja/g++.other/init5.C execution test
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 11 Oct 2011 13:08:19 +0000
- Subject: [Bug c++/27692] FAIL: g++.old-deja/g++.other/init5.C execution test
- Auto-submitted: auto-generated
- References: <bug-27692-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27692
--- Comment #10 from Jason Merrill <jason at gcc dot gnu.org> 2011-10-11 13:08:19 UTC ---
Namespace-scope objects aren't the problem; we've always handled them fine.
The problem is with function-local statics, which aren't constructed until the
function is called, so we can't determine the order of construction at compile
time. We need to use atexit for them, and so for proper interleaving of
destructors we need to use atexit for namespace-scope objects as well, but that
can cause trouble with dlclose, which is why we created __cxa_atexit.