Executable fails to compile with -frepo using g++ 4.1 g++ (GCC) 4.1.0 20060304 (Red Hat 4.1.0-3) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I'll attach the source code. The error is: main.o: In function `void std::__adjust_heap<__gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, int, X*, XCompare>(__gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, int, int, X*, XCompare)':main.cpp:(.text+0xfe): undefined reference to `void std::__push_heap<__gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, int, X*, XCompare>(__gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, int, int, X*, XCompare)' main.o: In function `void std::__introsort_loop<__gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, int>(__gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, __gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, int)':main.cpp:(.text+0x1ea): undefined reference to `__gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > > std::__unguarded_partition<__gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, X*>(__gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, __gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, X*)' main.o: In function `void std::__introsort_loop<__gnu_cxx::__normal_iterator<X*, std::vector<X, std::allocator<X> > >, int>(__gnu_cxx::__normal_iterator<X*, std::vector<X, std::allocator<X> > >, __gnu_cxx::__normal_iterator<X*, std::vector<X, std::allocator<X> > >, int)':main.cpp:(.text+0x3f4): undefined reference to `__gnu_cxx::__normal_iterator<X*, std::vector<X, std::allocator<X> > > std::__unguarded_partition<__gnu_cxx::__normal_iterator<X*, std::vector<X, std::allocator<X> > >, X>(__gnu_cxx::__normal_iterator<X*, std::vector<X, std::allocator<X> > >, __gnu_cxx::__normal_iterator<X*, std::vector<X, std::allocator<X> > >, X)' main.o: In function `void std::__final_insertion_sort<__gnu_cxx::__normal_iterator<X*, std::vector<X, std::allocator<X> > > >(__gnu_cxx::__normal_iterator<X*, std::vector<X, std::allocator<X> > >, __gnu_cxx::__normal_iterator<X*, std::vector<X, std::allocator<X> > >)':main.cpp:(.text+0x4b5): undefined reference to `void std::__insertion_sort<__gnu_cxx::__normal_iterator<X*, std::vector<X, std::allocator<X> > > >(__gnu_cxx::__normal_iterator<X*, std::vector<X, std::allocator<X> > >, __gnu_cxx::__normal_iterator<X*, std::vector<X, std::allocator<X> > >)' main.o: In function `void std::__adjust_heap<__gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, int, X*, std::binary_negate<XCompare> >(__gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, int, int, X*, std::binary_negate<XCompare>)':main.cpp:(.text+0x5d6): undefined reference to `void std::__push_heap<__gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, int, X*, std::binary_negate<XCompare> >(__gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, int, int, X*, std::binary_negate<XCompare>)' main.o: In function `void std::__introsort_loop<__gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, int, XCompare>(__gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, __gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, int, XCompare)':main.cpp:(.text+0xc80): undefined reference to `__gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > > std::__unguarded_partition<__gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, X*, XCompare>(__gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, __gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, X*, XCompare)' main.o: In function `void std::__introsort_loop<__gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, int, std::binary_negate<XCompare> >(__gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, __gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, int, std::binary_negate<XCompare>)':main.cpp:(.text+0x1004): undefined reference to `__gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > > std::__unguarded_partition<__gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, X*, std::binary_negate<XCompare> >(__gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, __gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, X*, std::binary_negate<XCompare>)' main.o: In function `void std::__introsort_loop<__gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, int>(__gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, __gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, int)':main.cpp:(.text+0x23f): undefined reference to `void std::partial_sort<__gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > > >(__gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, __gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >, __gnu_cxx::__normal_iterator<X**, std::vector<X*, std::allocator<X*> > >)' main.o: In function `void std::__introsort_loop<__gnu_cxx::__normal_iterator<X*, std::vector<X, std::allocator<X> > >, int>(__gnu_cxx::__normal_iterator<X*, std::vector<X, std::allocator<X> > >, __gnu_cxx::__normal_iterator<X*, std::vector<X, std::allocator<X> > >, int)':main.cpp:(.text+0x44f): undefined reference to `void std::partial_sort<__gnu_cxx::__normal_iterator<X*, std::vector<X, std::allocator<X> > > >(__gnu_cxx::__normal_iterator<X*, std::vector<X, std::allocator<X> > >, __gnu_cxx::__normal_iterator<X*, std::vector<X, std::allocator<X> > >, __gnu_cxx::__normal_iterator<X*, std::vector<X, std::allocator<X> > >)' main.o: In function `void std::__final_insertion_sort<__gnu_cxx::__normal_iterator<X*, std::vector<X, std::allocator<X> > > >(__gnu_cxx::__normal_iterator<X*, std::vector<X, std::allocator<X> > >, __gnu_cxx::__normal_iterator<X*, std::vector<X, std::allocator<X> > >)':main.cpp:(.text+0x53a): undefined reference to `void std::__insertion_sort<__gnu_cxx::__normal_iterator<X*, std::vector<X, std::allocator<X> > > >(__gnu_cxx::__normal_iterator<X*, std::vector<X, std::allocator<X> > >, __gnu_cxx::__normal_iterator<X*, std::vector<X, std::allocator<X> > >)' collect2: ld returned 1 exit status make: *** [ex31] Error 1 And no, I don't have a "vanilla" gcc 4.1 to test with. -- Summary: Compile/link failure with -frepo and g++ 4.1 Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rankincj at yahoo dot com GCC build triplet: i386-redhat-linux GCC host triplet: i386-redhat-linux GCC target triplet: i386-redhat-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26922