diff options
| author | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-12-17 15:09:11 +0000 |
|---|---|---|
| committer | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-12-17 15:09:11 +0000 |
| commit | cc1a5185c7d9f249a5026abe7c40d91a05651e6a (patch) | |
| tree | 84788bbf3494f51aaf3b9a72b5efd940a15ed280 /gcc/java/expr.c | |
| parent | b34c39765dcfb29481dbc16f2b9633986ed3daec (diff) | |
| download | ppe42-gcc-cc1a5185c7d9f249a5026abe7c40d91a05651e6a.tar.gz ppe42-gcc-cc1a5185c7d9f249a5026abe7c40d91a05651e6a.zip | |
2004-12-17 Andrew Haley <aph@redhat.com>
PR java/18931
* typeck.c (convert): Use a CONVERT_EXPR when converting to
BOOLEAN_TYPE or CHAR_TYPE.
(convert_to_boolean, convert_to_char) : Remove.
* convert.h (convert_to_boolean, convert_to_char) : Remove.
* expr.c (expand_load_internal): Do type conversion if type is not
as required.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92314 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/expr.c')
| -rw-r--r-- | gcc/java/expr.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/java/expr.c b/gcc/java/expr.c index fdc8ae69ce6..8c1ad70e141 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -1329,6 +1329,9 @@ 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) + && TREE_TYPE (copy) != TREE_TYPE (var)) + var = convert (type, var); java_add_local_var (copy); java_add_stmt (build2 (MODIFY_EXPR, TREE_TYPE (var), copy, var)); |

