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]

explicit instantiation gives internal error


SYSTEM:: x86 running 2.2.5, libc 2.1.1.

COMPILER VERSION:
  austern@pizzelle% /home/austern/bin/g++ -v
  Reading specs from /home/austern/lib/gcc-lib/i686-pc-linux-gnu/2.96/specs
  gcc version 2.96 20000103 (experimental)

PROGRAM SOURCE, and error message.
austern@pizzelle% cat explspec.cc
class A {
public:
  static void f();
};

template <class T>
class B : public A {
  friend void A::f();
};

template <class T>
class C : public B<T>
{
};

template class C<char>;

austern@pizzelle% g++ explspec.cc
explspec.cc: In instantiation of `B<char>':
explspec.cc:16:   instantiated from `C<char>'
explspec.cc:16:   instantiated from here
explspec.cc:3: Internal compiler error.
explspec.cc:3: Please submit a full bug report.
explspec.cc:3: See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for
instructions.


This is a regression, by the way.  The program compiles without diagnostics
using 2.91 (a.k.a. egcs 1.1.1).

			--Matt Austern

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