diff src/share/vm/opto/doCall.cpp @ 7604:f1de9dbc914e

8006109: test/java/util/AbstractSequentialList/AddAll.java fails: assert(rtype == ctype) failed: mismatched return types Reviewed-by: kvn
author twisti
date Tue, 15 Jan 2013 12:06:18 -0800
parents 5698813d45eb
children 6f3fd5150b67
line wrap: on
line diff
--- a/src/share/vm/opto/doCall.cpp	Mon Jan 14 08:22:32 2013 -0800
+++ b/src/share/vm/opto/doCall.cpp	Tue Jan 15 12:06:18 2013 -0800
@@ -553,7 +553,13 @@
         rtype = ctype;
       }
     } else {
-      assert(rtype == ctype, "mismatched return types");  // symbolic resolution enforces this
+      // Symbolic resolution enforces the types to be the same.
+      // NOTE: We must relax the assert for unloaded types because two
+      // different ciType instances of the same unloaded class type
+      // can appear to be "loaded" by different loaders (depending on
+      // the accessing class).
+      assert(!rtype->is_loaded() || !ctype->is_loaded() || rtype == ctype,
+             err_msg_res("mismatched return types: rtype=%s, ctype=%s", rtype->name(), ctype->name()));
     }
 
     // If the return type of the method is not loaded, assert that the