This is the mail archive of the gcc-patches@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]

[C++ PATCH] fix checking ICE


Hi,
I installed the attached which fixes an ICE when running a checked
compiler.

g++.mike/s24939.C:9: field `a' has incomplete type
g++.mike/s24939.C:10: Tree check: expected class 't', have 'x' (error_mark)
g++.mike/s24939.C:10: Internal compiler error in `make_binfo', at tree.c:860

nathan
-- 
Dr Nathan Sidwell   ::   http://www.codesourcery.com   ::   CodeSourcery LLC
         'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>

	* decl2.c (grokfield): Bail out if type is error_mark_node.

Index: cp/decl2.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/decl2.c,v
retrieving revision 1.318
diff -c -3 -p -r1.318 decl2.c
*** decl2.c	2000/03/12 18:47:52	1.318
--- decl2.c	2000/03/16 09:08:09
*************** grokfield (declarator, declspecs, init, 
*** 1593,1598 ****
--- 1593,1600 ----
    if (! value || value == error_mark_node)
      /* friend or constructor went bad.  */
      return value;
+   if (TREE_TYPE (value) == error_mark_node)
+     return error_mark_node;  
  
    /* Pass friendly classes back.  */
    if (TREE_CODE (value) == VOID_TYPE)

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