[PATCH] Fix PR41814

Richard Guenther rguenther@suse.de
Sun Oct 25 12:12:00 GMT 2009


Due to the Java FE overloading BINFO_VIRTUALS for its own purpose
and not following the this-is-a-tree-list documentation of the
middle-end we now ICE when building without -g due to free-lang-data
walking a tree list even if it isn't one.  Fixed by detecting
this case.

Committed as obvious.

Richard.

2009-10-25  Richard Guenther  <rguenther@suse.de>

	PR middle-end/41814
	* tree.c (find_decls_types_r): Deal with Java overloading
	BINFO_VIRTUALS for its own purpose.

Index: gcc/tree.c
===================================================================
*** gcc/tree.c	(revision 153538)
--- gcc/tree.c	(working copy)
*************** find_decls_types_r (tree *tp, int *ws, v
*** 4648,4658 ****
  				   i, tem); ++i)
  	    fld_worklist_push (TREE_TYPE (tem), fld);
  	  tem = BINFO_VIRTUALS (TYPE_BINFO (t));
! 	  while (tem)
! 	    {
! 	      fld_worklist_push (TREE_VALUE (tem), fld);
! 	      tem = TREE_CHAIN (tem);
! 	    }
  	}
        if (RECORD_OR_UNION_TYPE_P (t))
  	{
--- 4648,4662 ----
  				   i, tem); ++i)
  	    fld_worklist_push (TREE_TYPE (tem), fld);
  	  tem = BINFO_VIRTUALS (TYPE_BINFO (t));
! 	  if (tem
! 	      /* The Java FE overloads BINFO_VIRTUALS for its own purpose.  */
! 	      && TREE_CODE (tem) == TREE_LIST)
! 	    do
! 	      {
! 		fld_worklist_push (TREE_VALUE (tem), fld);
! 		tem = TREE_CHAIN (tem);
! 	      }
! 	    while (tem);
  	}
        if (RECORD_OR_UNION_TYPE_P (t))
  	{



More information about the Gcc-patches mailing list