G++ ICE in 2.95.2 and mainline 20000720 (i386-linux)

Matthias Klose doko@cs.tu-berlin.de
Sun Jul 23 11:16:00 GMT 2000


[please CC 53698@bugs.debian.org on replies]

g++ bug-53698.C 
bug-53698.C: In method `void Component::start_handler (comp_type) [with comp_type = Component *]':
bug-53698.C:20:   instantiated from here
bug-53698.C:14: Tree check: expected class 'd', have 'r' (component_ref)
bug-53698.C:14: Internal compiler error in arg_assoc, at ../src/gcc/cp/decl2.c:5031
Please submit a full bug report.
See <URL: http://www.gnu.org/software/gcc/bugs.html > for instructions.



void foobar (void (*)(void *));

class Component {
public:
  virtual void handler () {}

  template <class comp_type> void start_handler (comp_type);
private:
  template <class comp_type> static void * startup (void *);
};

template <class comp_type> void Component::start_handler (comp_type data)
{
  foobar (&startup<comp_type>); /* Internal compiler error here.  */
}

int main ()
{
  Component comp;
  comp.start_handler (&comp);   /* Instantiated here.  */
}



More information about the Gcc-bugs mailing list