[Bug c++/52477] New: Wrong initialization order? __attribute__((constructor)) vs static data access
przemoc at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sun Mar 4 12:50:00 GMT 2012
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
More information about the Gcc-bugs
mailing list