summaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2003-11-19 03:09:30 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2003-11-19 03:09:30 +0000
commit0b64b5a6800690030e0b14f7f65ea472d4607a04 (patch)
treed9d70e2070edb10c8d23ae6a2194672dcf82e204 /libjava
parent7c13af68078661e97a5094fff5769b7cd856f211 (diff)
downloadgcc-0b64b5a6800690030e0b14f7f65ea472d4607a04.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73722 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog6
-rw-r--r--libjava/verify.cc7
2 files changed, 10 insertions, 3 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 68b32b125bc..bcd687e4d1e 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -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.
diff --git a/libjava/verify.cc b/libjava/verify.cc
index ba408aa98be..34583bdc180 100644
--- a/libjava/verify.cc
+++ b/libjava/verify.cc
@@ -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);
}