From 06323ab0db08237b431a03f6e82b6f6a512f651e Mon Sep 17 00:00:00 2001 From: rguenth Date: Sun, 25 Oct 2009 12:03:07 +0000 Subject: [PATCH] 2009-10-25 Richard Guenther PR middle-end/41814 * tree.c (find_decls_types_r): Deal with Java overloading BINFO_VIRTUALS for its own purpose. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153539 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/tree.c | 14 +++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bda1da3..82e7b7c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2009-10-25 Richard Guenther + + PR middle-end/41814 + * tree.c (find_decls_types_r): Deal with Java overloading + BINFO_VIRTUALS for its own purpose. + 2009-10-24 Adam Nemet * config/mips/predicates.md (hilo_operand): New predicate. diff --git a/gcc/tree.c b/gcc/tree.c index 5da346c..264e3ce 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -4648,11 +4648,15 @@ find_decls_types_r (tree *tp, int *ws, void *data) 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 (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)) { -- 2.7.4