OSDN Git Service

2004-01-27 Andrew Haley <aph@redhat.com>
authoraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 27 Jan 2004 17:30:06 +0000 (17:30 +0000)
committeraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 27 Jan 2004 17:30:06 +0000 (17:30 +0000)
        java/13273
        * parse.y (check_interface_throws_clauses): Make sure class_decl
        has been loaded.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76732 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/java/ChangeLog
gcc/java/parse.y

index 5d9ae79..c048dfa 100644 (file)
@@ -1,3 +1,9 @@
+2004-01-27  Andrew Haley  <aph@redhat.com>
+
+       java/13273
+       * parse.y (check_interface_throws_clauses): Make sure class_decl
+       has been loaded.
+
 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
 
        PR java/13733
index 507e958..6209737 100644 (file)
@@ -6485,10 +6485,20 @@ check_interface_throws_clauses (tree check_class_decl, tree class_decl)
 {
   for (; class_decl != NULL_TREE; class_decl = CLASSTYPE_SUPER (class_decl))
     {
-      tree bases = TYPE_BINFO_BASETYPES (class_decl);
-      int iface_len = TREE_VEC_LENGTH (bases) - 1;
+      tree bases;
+      int iface_len;
       int i;
 
+      if (! CLASS_LOADED_P (class_decl))
+       {
+         if (CLASS_FROM_SOURCE_P (class_decl))
+           safe_layout_class (class_decl);
+         else
+           load_class (class_decl, 1);
+       }
+
+      bases = TYPE_BINFO_BASETYPES (class_decl);
+      iface_len = TREE_VEC_LENGTH (bases) - 1;
       for (i = iface_len; i > 0; --i)
        {
          tree interface = BINFO_TYPE (TREE_VEC_ELT (bases, i));