Subject: toolchain/15405: g++ internal error
To: None <>
From: Andreas Gustafsson <>
List: netbsd-bugs
Date: 01/28/2002 09:55:02
>Number:         15405
>Category:       toolchain
>Synopsis:       g++ internal error
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 28 09:56:01 PST 2002
>Originator:     Andreas Gustafsson
>Release:        NetBSD 1.5Z
Nominum Inc
System: NetBSD 1.5Z NetBSD 1.5Z (GUAVA) #0: Thu Jan 17 19:19:55 PST 2002 i386
Architecture: i386
Machine: i386
When I try to compile a certain C++ program under NetBSD-current, g++
exits with an internal error.  This happens only with the gcc 2.95.3
based compiler that comes with -current; neither gcc 2.91 (in an earlier
NetBSD-current), gcc 2.96 (which comes with a certain other operating
system), nor Comeau C++ (a commercial third-party compiler) has any
problem compiling this code.


Execute the shell commands

  cat > <<EOF
  int t(char *, char *);
  template <class K>
  struct H {
	  typedef int t;
  template <class K>
  struct X {
	  typedef H<K>::t t;
	  void g(t);
  cc -c

and see the error message Internal compiler error 61. Please submit a full bug report. See <URL:> for instructions.


Upgrade to gcc 2.96 or newer.