This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52477] New: Wrong initialization order? __attribute__((constructor)) vs static data access
- From: "przemoc at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 04 Mar 2012 12:50:09 +0000
- Subject: [Bug c++/52477] New: Wrong initialization order? __attribute__((constructor)) vs static data access
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52477
Bug #: 52477
Summary: Wrong initialization order?
__attribute__((constructor)) vs static data access
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: przemoc@gmail.com
Created attachment 26821
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26821
Short exemplary code showing the problem
Attached file compiles flawlessly on 4.7.0, but the output binary segfaults.
Works fine in 4.6.2 though (as expected).
Looks like a serious regression.
g++-4.7 (GCC) 4.7.0 20120304 (prerelease)
built on debian wheezy x64 with:
--enable-languages=c,c++ --prefix=/opt/gcc-4.7 --program-suffix=-4.7
svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@184878