]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
verify.c (merge_types): Load the types to merge if necessary.
authorAlexandre Petit-Bianco <apbianco@cygnus.com>
Thu, 7 Sep 2000 18:24:41 +0000 (18:24 +0000)
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>
Thu, 7 Sep 2000 18:24:41 +0000 (11:24 -0700)
2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>

* verify.c (merge_types): Load the types to merge if necessary.

(http://gcc.gnu.org/ml/gcc-patches/2000-09/msg00245.html)

From-SVN: r36243

gcc/java/ChangeLog
gcc/java/verify.c

index 425f8011548703e73ed8c7d94a5c460447fd550b..d8f85fca0cafb3bc54b63a19cc1bf57891b44f0b 100644 (file)
@@ -2,6 +2,10 @@
 
        * lang-specs.h: Also recognize `-femit-class-files'.
 
+2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
+
+       * verify.c (merge_types): Load the types to merge if necessary.
+
 2000-09-02  Anthony Green  <green@redhat.com>
 
        * jcf-io.c: Include zlib.h.
index 4c2e4c8b1d3a77954f41780f0265846e8f58a6dd..fcaf7f37af5e204744a8aa53cd027b63eceabd6a 100644 (file)
@@ -131,6 +131,20 @@ merge_types (type1, type2)
       tt1 = HANDLE_TO_CLASS_TYPE (TREE_TYPE (type1));
       tt2 = HANDLE_TO_CLASS_TYPE (TREE_TYPE (type2));
 
+      /* If tt{1,2} haven't been properly loaded, now is a good time
+         to do it. */
+      if (!TYPE_SIZE (tt1))
+       {
+         load_class (tt1, 1);
+         safe_layout_class (tt1);
+       }
+
+      if (!TYPE_SIZE (tt2))
+       {
+         load_class (tt2, 1);
+         safe_layout_class (tt2);
+       }
+
       if (TYPE_ARRAY_P (tt1) || TYPE_ARRAY_P (tt2))
        {
          if (TYPE_ARRAY_P (tt1) == TYPE_ARRAY_P (tt2))