[forwarded from http://bugs.debian.org/428926]

current 4.1 branch fails to link when the following code (extracted from the
gmp source) is built with -O1 (the libstdc++.so.6 on the system is the one
built by the current 4.2 branch).

$ g++ -O1  t-locale.cc
/tmp/ccXHCSZ6.o: In function `main':
t-locale.cc:(.text+0xa4): undefined reference to
`std::numpunct<char>::_M_initialize_numpunct(__locale_struct*)'
collect2: ld returned 1 exit status


#include <clocale>
#include <iostream>

using namespace std;


class my_numpunct : public numpunct<char>
{
public:
    explicit my_numpunct (size_t r = 0) : numpunct<char>(r) { }
};

int main (void)
{
    my_numpunct foo;
    return 0;
}


-- 
           Summary: [4.1 regression ?] fails to link using -O
           Product: gcc
           Version: 4.1.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: debian-gcc at lists dot debian dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32509

Reply via email to