g++-2.95.2: internal compiler error (with testcase)

Bernd Nottelmann nottelm@uni-muenster.de
Sat Mar 18 12:20:00 GMT 2000


Hi

the following code causes an internal compiler error:

// ========== A.C ==========
void foo(void (*f)());

struct A {
  template <int s>
  static void g() {}

  template <int s>
  inline static void f() {
    foo(g<s>);
  }

  static void f_plus () { f<0>(); }
};
// ======= snip here =======

> g++ -c  A.C
A.C: In function `static void A::f<0>()':
A.C:12:   instantiated from here
A.C:9: Internal compiler error.
A.C:9: Please submit a full bug report.
A.C:9: See <URL: http://www.gnu.org/software/gcc/faq.html#bugreport > for instructions.

My version is
g++ -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/specs
gcc version 2.95.2 19991024 (release)

(under glibc-2.1.3, but this plays no role)

Bernd




More information about the Gcc-bugs mailing list