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]

G++ 2.95 (99R1) bug using -frepo


I believe a bug has been introduced in the 99R1 version using
the -frepo switch to instantiate templates.  Given the attached file,
if compiled as:
g++ -c -frepo test_temp.C
then generate the executable with:
g++ -frepo -o test_temp  test_temp.o
the following output occurs, causing the collect step to not complete,
providing
the undefined reference.:

collect: recompiling test_temp.C
test_temp.C:26: duplicate explicit instantiation of `class Foo<int>'
test_temp.C:27: duplicate explicit instantiation of `class Foo<short int>'
test_temp.o(.text+0x829):test_temp.cc: undefined reference to `vector<int,
allocator<int> >::_M_insert_aux(int *, int const &)'

It appears as though the .rpo file is being examined, and causing the
duplicate explicit instantiation.
This error did not occur in 98r2.  In addition, if you recompile the file
without removing the
.rpo file, the same explicit instantiation error occurs.
This appears to be a generic bug in 99r1 as it was reproduced under Linux as
well as Interix under Windows NT.

 <<test_temp.C>> 
As a note, once we receive the release of 99r1 for our supported platforms,
I will
re-submit this bug through the registered customer mechanism.

Thanks,
Jim Rudakewiz
Union Switch and Signal, INC

test_temp.C


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