Internal compiler error - (new of prvt struct in template fn?)

Ian Nixon ian@tharas.com
Wed Apr 21 15:04:00 GMT 1999


Using:
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)

The following code:

class Action {
public:
  virtual void action () = 0;
};

class Var {
public:

  template<class Base> void Add() {
	struct tmp : public Action {
	  void action () {}
	};
	tmp *tp = new tmp; // Line 14
  }

};

Compiled as:
g++ code.cc

Produces:
code.cc: In method `void Var::Add()':
code.cc:14: Internal compiler error.
code.cc:14: Please submit a full bug report to
`egcs-bugs@egcs.cygnus.com'.
code.cc:14: See <URL: http://egcs.cygnus.com/faq.html#bugreport > for
details.

--------
Ian Nixon


More information about the Gcc-bugs mailing list