$ cat > a.cc template <typename T> struct struct1: public T { struct1() : T() {} }; void g(void) { struct1<int *> c; } $ g++ a.cc a.cc: In instantiation of `struct1<int*>': a.cc:3: instantiated from here a.cc:3: base type `int*' fails to be a struct or class type a.cc: In constructor `struct1<T>::struct1() [with T = int*]': a.cc:3: instantiated from here a.cc:2: type ` Internal compiler error: Error reporting routines re-entered.
$ g++-3.3 test.cc test.cc: In instantiation of `struct1<int*>': test.cc:3: instantiated from here test.cc:3: error: base type `int*' fails to be a struct or class type test.cc: In constructor `struct1<T>::struct1() [with T = int*]': test.cc:3: instantiated from here test.cc:2: error: type ` Internal compiler error: Error reporting routines re-entered.
still in gcc3.4
Fixed in g++ 4.1.1: a.cc: In instantiation of 'struct1<int*>': a.cc:3: instantiated from here a.cc:2: error: base type 'int*' fails to be a struct or class type a.cc: In constructor 'struct1<T>::struct1() [with T = int*]': a.cc:3: instantiated from here a.cc:2: error: type 'int*' is not a direct base of 'struct1<int*>'