From 4b886873914887e749e96c8638928c524060edf6 Mon Sep 17 00:00:00 2001 From: Andrew Haley Date: Thu, 6 Nov 2003 15:19:49 +0000 Subject: expr.c (java_stack_swap): Make sure destination stack slots are of the correct type. 2003-11-06 Andrew Haley * expr.c (java_stack_swap): Make sure destination stack slots are of the correct type. From-SVN: r73306 --- gcc/java/expr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gcc/java/expr.c') 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; } -- cgit v1.1