This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PR java/17586 [4.0 regression] kawa build fails with ICE


Okay, so here's the real patch.

load_class() was checking to see if a class was already loaded from
source, but only if load_class() had been passed a TYPE_DECL, not if
it'd been passed an identifier.  

This patch generalizes load_class() to check even when it's been
passed an identifier.

Andrew.


2004-09-28  Andrew Haley  <aph@redhat.com>

	PR java/17586
	* jcf-parse.c (load_class): Don't try to read a class that we've
	already read.

Index: jcf-parse.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/jcf-parse.c,v
retrieving revision 1.171
diff -p -2 -c -w -r1.171 jcf-parse.c
*** jcf-parse.c	28 Sep 2004 14:58:31 -0000	1.171
--- jcf-parse.c	28 Sep 2004 16:51:10 -0000
*************** load_class (tree class_or_name, int verb
*** 568,571 ****
--- 568,572 ----
    tree name, saved;
    int class_loaded;
+   tree class_decl;
  
    /* class_or_name can be the name of the class we want to load */
*************** load_class (tree class_or_name, int verb
*** 578,587 ****
    /* Or it's a type in the making */
    else
!     {
        /* If the class is from source code, then it must already be loaded.  */
!       if (CLASS_FROM_SOURCE_P (class_or_name))
          return;
-       name = DECL_NAME (TYPE_NAME (class_or_name));
-     }
  
    saved = name;
--- 579,588 ----
    /* Or it's a type in the making */
    else
!     name = DECL_NAME (TYPE_NAME (class_or_name));
! 
    /* If the class is from source code, then it must already be loaded.  */
!   class_decl = IDENTIFIER_CLASS_VALUE (name);
!   if (class_decl && CLASS_FROM_SOURCE_P (TREE_TYPE (class_decl)))
      return;
  
    saved = name;


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