diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-26 15:04:25 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-26 15:04:25 +0000 |
commit | 39ab05ed849dd9e7bec4a49bdee4c5df9f6a911e (patch) | |
tree | 7fae0fd18d5bcc4420decdc9fc9502bda95eadcc /gcc/fold-const.c | |
parent | 5e0d76db7312c617ca48959b739e2380e16f83f5 (diff) | |
download | gcc-39ab05ed849dd9e7bec4a49bdee4c5df9f6a911e.tar.gz |
* fold-const.c (fold, case CONVERT_EXPR): Always return tree of
proper type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37757 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index aaff05f4d75..d8131faf226 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -5103,7 +5103,7 @@ fold (expr) if (TYPE_MAIN_VARIANT (inside_type) == TYPE_MAIN_VARIANT (final_type) && ((inter_int && final_int) || (inter_float && final_float)) && inter_prec >= final_prec) - return TREE_OPERAND (TREE_OPERAND (t, 0), 0); + return convert (final_type, TREE_OPERAND (TREE_OPERAND (t, 0), 0)); /* Likewise, if the intermediate and final types are either both float or both integer, we don't need the middle conversion if |