From c6e5d1af3f58d3426d92abec7818dd25871aba1b Mon Sep 17 00:00:00 2001 From: Andrew Haley Date: Thu, 28 Jul 2005 15:00:53 +0000 Subject: [PATCH] expr.c (expand_load_internal): Convert to destination type. 2005-07-15 Andrew Haley * expr.c (expand_load_internal): Convert to destination type. From-SVN: r102485 --- gcc/java/ChangeLog | 4 ++++ gcc/java/expr.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index aa23f33e33b..e9a07d9ed55 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,7 @@ +2005-07-15 Andrew Haley + + * expr.c (expand_load_internal): Convert to destination type. + 2005-07-22 Manfred Hollstein * verify-impl.c (check_class_constant): Fix uninitialised warnings. diff --git a/gcc/java/expr.c b/gcc/java/expr.c index f3f4c84fdb3..5c5a56ca9c4 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -1321,7 +1321,7 @@ expand_load_internal (int index, tree type, int pc) value into it. Then we push this new local on the stack. Hopefully this all gets optimized out. */ copy = build_decl (VAR_DECL, NULL_TREE, type); - if (INTEGRAL_TYPE_P (type) + if (INTEGRAL_TYPE_P (type) || POINTER_TYPE_P (type) && TREE_TYPE (copy) != TREE_TYPE (var)) var = convert (type, var); java_add_local_var (copy); -- 2.30.2