This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: -frepo not working?


Alexandre Oliva wrote:

> On Dec 14, 1998, Chad Gatesman <chadg@redrose.net> wrote:
>
> > The problem I see is that when I compile with -frepo, I get unresolved
> > symbols to what looks like all my templates when it does the final
> > link.  Why would it not be instantiating my templates?
>
> There were bugs in older releases, that may have been fixed in 1.1.1
> or not.  Will you please post a code snippet that demonstrates the
> problem so that we can verify if the bug you have found has been fixed
> or not?

This can be reproduced very easily.  I will show you an example using
egcs-1.1.1:

_________________________________

// repo-fail.cc
#include <vector>

void main()
{
    vector<int> v;

    v.push_back(1);
}

_________________________________


chad:/tmp> g++ -c -frepo repo-fail.cc
chad:/tmp> g++ -o repo-fail repo-fail.o
repo-fail.o: In function `vector<int, __default_alloc_template<false, 0>
>::push_back(int const &)':
repo-fail.o(.vector<int, __default_alloc_template<0, 0>
>::gnu.linkonce.t.push_back(int const &)+0x35): undefined reference to
`vector<int, __default_alloc_template<false, 0> >::insert_aux(int *, int
const &)'
collect2: ld returned 1 exit status



--
Chad Gatesman
Software Engineer
Bristol Technology
http://www.bristol.com/




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]