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]

PATCH for Internal Compiler error



Jason --

>  I am getting an internal compiler error in EG++. t.cc is the preprocessed
>  output from the actual compiler which I have placed at
>  http://www.ualberta.ca/~jgg/t.cc.gz [42k]

  Here's a patch for this problem.  Jason (Merrill, not Gunthorpe), is
this OK?  Also, because I've got a few patches outstanding, when you
let me know whether or not it's OK, I'd appreciate your including the
ChangeLog entry so I'm sure I know which patch were talking about.

-- 
Mark Mitchell		mmitchell@usa.net
Stanford University	http://www.stanford.edu


struct C
{
  struct D
  {
  };
};

struct E
{
  C& c;
  void g();
};

void E::g()
{
  c.D().f();
}

Thu Mar 12 15:35:34 1998  Mark Mitchell  <mmitchell@usa.net>

	* call.c (build_field_call): Don't crash when presented with a
	field that is actually a nested type.

Index: call.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/call.c,v
retrieving revision 1.50
diff -c -p -r1.50 call.c
*** call.c	1998/03/12 00:29:08	1.50
--- call.c	1998/03/12 23:43:05
*************** build_field_call (basetype_path, instanc
*** 169,175 ****
    if (field == error_mark_node)
      return error_mark_node;
  
!   if (field)
      {
        tree basetype;
        tree ftype = TREE_TYPE (field);
--- 169,175 ----
    if (field == error_mark_node)
      return error_mark_node;
  
!   if (field && TREE_CODE (field) == FIELD_DECL)
      {
        tree basetype;
        tree ftype = TREE_TYPE (field);


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