]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libgcj/13026 (libgcj verifier failure)
authorTom Tromey <tromey@redhat.com>
Wed, 19 Nov 2003 03:09:30 +0000 (03:09 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Wed, 19 Nov 2003 03:09:30 +0000 (03:09 +0000)
PR libgcj/13026:
* verify.cc (state::copy): Only set local_changed if we're in a
subroutine.  Correctly copy local variables which were modified
by the subroutine.
(push_jump_merge): Added more debugging output.

From-SVN: r73722

libjava/ChangeLog
libjava/verify.cc

index 68b32b125bc1720c24e4990eeaf5298cd6fd8a83..bcd687e4d1e490882bec76f1f35cd5ace1a7e877 100644 (file)
@@ -1,5 +1,11 @@
 2003-11-18  Tom Tromey  <tromey@redhat.com>
 
+       PR libgcj/13026:
+       * verify.cc (state::copy): Only set local_changed if we're in a
+       subroutine.  Correctly copy local variables which were modified
+       by the subroutine.
+       (push_jump_merge): Added more debugging output.
+
        * jni.cc (_Jv_JNI_GetStringUTFChars): Fail gracefully if string
        is null.
 
index ba408aa98bee90f669c9580c662b1bafb23726b0..34583bdc180e84bbe645d205bb5ce63ab01eca0a 100644 (file)
@@ -1025,11 +1025,11 @@ private:
          // See push_jump_merge to understand this case.
          if (ret_semantics)
            locals[i] = type (copy->local_changed[i]
-                             ? unsuitable_type
+                             ? copy->locals[i]
                              : unused_by_subroutine_type);
          else
            locals[i] = copy->locals[i];
-         local_changed[i] = copy->local_changed[i];
+         local_changed[i] = subroutine ? copy->local_changed[i] : false;
        }
 
       clean_subrs ();
@@ -1465,7 +1465,8 @@ private:
        // which was not modified by the subroutine.
        states[npc] = new state (nstate, current_method->max_stack,
                                 current_method->max_locals, ret_semantics);
-       debug_print ("== New state in push_jump_merge\n");
+       debug_print ("== New state in push_jump_merge (ret_semantics = %s)\n",
+                    ret_semantics ? "true" : "false");
        states[npc]->print ("New", npc, current_method->max_stack,
                            current_method->max_locals);
       }