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: unassig...@gcc.gnu.org
        ReportedBy: prze...@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

Reply via email to