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]

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


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



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