diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2000-11-26 15:04:25 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2000-11-26 10:04:25 -0500 |
commit | 72bd1f9e60ca670b9199ef29ea81a45a0b6953e7 (patch) | |
tree | 7fae0fd18d5bcc4420decdc9fc9502bda95eadcc /gcc/fold-const.c | |
parent | b21218ce2ebc16e19dea324dd8ab0229914c4454 (diff) | |
download | gcc-72bd1f9e60ca670b9199ef29ea81a45a0b6953e7.zip gcc-72bd1f9e60ca670b9199ef29ea81a45a0b6953e7.tar.gz gcc-72bd1f9e60ca670b9199ef29ea81a45a0b6953e7.tar.bz2 |
fold-const.c (fold, [...]): Always return tree of proper type.
* fold-const.c (fold, case CONVERT_EXPR): Always return tree of
proper type.
From-SVN: r37757
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 aaff05f..d8131fa 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 |