This is the mail archive of the 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]

Bug with template statements ?

Using g++ (2.95.2) on Linux paraski23 2.2.13-SMP #1 SMP Fri Feb 18 16:22:38 CET 2000 i686 unknown (output of uname -a)

command used : g++ simple.cxx


David Margery <><   (
PhD student at Irisa, Rennes, France
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.2/specs
gcc version 2.95.2 20000313 (Debian GNU/Linux)
 /usr/lib/gcc-lib/i386-linux/2.95.2/cpp -lang-c++ -v -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -D__ELF__ -Dunix -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__EXCEPTIONS -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ simple.cxx simple.ii
GNU CPP version 2.95.2 20000313 (Debian GNU/Linux) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
End of search list.
The following default directories have been omitted from the search path:
End of omitted list.
 /usr/lib/gcc-lib/i386-linux/2.95.2/cc1plus simple.ii -quiet -dumpbase -version -o simple.s
GNU C++ version 2.95.2 20000313 (Debian GNU/Linux) (i386-linux) compiled by GNU C version 2.95.2 20000313 (Debian GNU/Linux).
simple.cxx: In instantiation of `B<A1>':
simple.cxx:39:   instantiated from here
simple.cxx:39: Internal compiler error.
simple.cxx:39: Please submit a full bug report.
simple.cxx:39: See <URL:> for instructions.
# 1 "simple.cxx"
template <class T> class A1 {
   A1() {};
   virtual ~A1() {};
   template <class other> A1 & operator=(const A1<other> o) {
   T i;
template <class T> class A2 {
   A2() {};
   virtual ~A2() {};
   template <class other> A2 & operator=(const A2<other> o) {
   T i;
   T j;

template <template <class U> class T> class B {
   virtual ~B(){};
   template <template <class U2> class O> struct rebind { typedef B<O> other ;};
   template <template <class U2> class O> B & operator=(const B<O> o) {
   T<int> i;

int main(int argc, char argv[]) {
   A1<int> a1;
   A1<long> a2;
   B<A1 > b1;
   B<A2 > b2;

   return 0;

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