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++ ICE in 2.95.2 and mainline 20000720 (i386-linux)


[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.  */
}


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