aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/expr.c
diff options
context:
space:
mode:
authorAndrew Haley <aph@redhat.com>2003-11-06 15:19:49 +0000
committerAndrew Haley <aph@gcc.gnu.org>2003-11-06 15:19:49 +0000
commit4b886873914887e749e96c8638928c524060edf6 (patch)
treec03c6855794b67bdd2fec6ad9cb8c6ce597ca95f /gcc/java/expr.c
parente88fb323aad7bc8974da3cb28aae2ef1b500583d (diff)
downloadgcc-4b886873914887e749e96c8638928c524060edf6.zip
gcc-4b886873914887e749e96c8638928c524060edf6.tar.gz
gcc-4b886873914887e749e96c8638928c524060edf6.tar.bz2
expr.c (java_stack_swap): Make sure destination stack slots are of the correct type.
2003-11-06 Andrew Haley <aph@redhat.com> * expr.c (java_stack_swap): Make sure destination stack slots are of the correct type. From-SVN: r73306
Diffstat (limited to 'gcc/java/expr.c')
-rw-r--r--gcc/java/expr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index e5654e7..8e7ea9d 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -503,8 +503,9 @@ java_stack_swap (void)
decl1 = find_stack_slot (stack_pointer - 1, type1);
decl2 = find_stack_slot (stack_pointer - 2, type2);
temp = copy_to_reg (DECL_RTL (decl1));
- emit_move_insn (DECL_RTL (decl1), DECL_RTL (decl2));
- emit_move_insn (DECL_RTL (decl2), temp);
+ emit_move_insn (DECL_RTL (find_stack_slot (stack_pointer - 1, type2)),
+ DECL_RTL (decl2));
+ emit_move_insn (DECL_RTL (find_stack_slot (stack_pointer - 2, type1)), temp);
stack_type_map[stack_pointer - 1] = type2;
stack_type_map[stack_pointer - 2] = type1;
}