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]

egcs-1.0.1 : linking bug with templates and -frepo on i86-linux-libc5 (2)



(This bug is similar to the previous one i reported, but i send it
separately because i don't know if they are related)

Hi,

g++ is not able to link the included program :

% g++ -frepo -c bug2.cc

% g++ bug2.o
bug2.o: In function `main':
bug2.o(.text+0x15): undefined reference to `void f<int>(A<int>)'
collect2: ld returned 1 exit status

template <class Type>
class A
{
};

template<class Type>
void f(A<Type> a)
{
}

int main()
{
  A<int> a;
  f(a);
}

This is on i586-pc-linux-gnulibc1 with libc-5.4.33.  On sparc-solaris
and mips-irix6, there is no problem.

-- 
Laurent.


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