[Bug c++/17873] New: order of static destructors wrong
bkoz at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Oct 6 22:59:00 GMT 2004
Known to work: g++-3.3.3
Known to work: icc-8.1
Known to fail: gcc 4.0.0, gcc-3.4.2
This is a regression.
The attached program shows a problem with static destruction. According to:
3.6.3 - Termination [basic.start.term]
...These objects are destroyed in the reverse order of the completion of their
constructor or of the completion of their dynamic initialization.
However, it looks like mainline is not doing this at the moment.
Expected output:
%a.out
boo ctor
foo ctor
foo dtor
boo dtor
Output with 3.4.2/mainline:
%a.out
boo ctor
foo ctor
boo dtor
foo dtor
Anyway. This is a reduced testcase for the way __mt_alloc is settting itself up.
So, fixing this is appreciated.
--
Summary: order of static destructors wrong
Product: gcc
Version: 3.4.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bkoz at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17873
More information about the Gcc-bugs
mailing list