diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2010-04-23 16:16:50 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2010-04-23 16:16:50 +0000 |
commit | 915f592197faeac0125688de07a5a8862c7e8995 (patch) | |
tree | b4fde14957f759576a713982c6bfc9a70e5a94a5 /gcc/expr.c | |
parent | ed0f0c0f2429d3624dd86da66dfcd3926e69a248 (diff) | |
download | gcc-915f592197faeac0125688de07a5a8862c7e8995.zip gcc-915f592197faeac0125688de07a5a8862c7e8995.tar.gz gcc-915f592197faeac0125688de07a5a8862c7e8995.tar.bz2 |
expr.c (expand_expr_real_1): Only use conversion between modes if both types are integral.
* expr.c (expand_expr_real_1) <VIEW_CONVERT_EXPR>: Only use conversion
between modes if both types are integral.
From-SVN: r158675
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -9323,9 +9323,8 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, op0 = force_reg (GET_MODE (op0), op0); op0 = gen_lowpart (mode, op0); } - /* If both modes are integral, then we can convert from one to the - other. */ - else if (SCALAR_INT_MODE_P (GET_MODE (op0)) && SCALAR_INT_MODE_P (mode)) + /* If both types are integral, convert from one mode to the other. */ + else if (INTEGRAL_TYPE_P (type) && INTEGRAL_TYPE_P (TREE_TYPE (treeop0))) op0 = convert_modes (mode, GET_MODE (op0), op0, TYPE_UNSIGNED (TREE_TYPE (treeop0))); /* As a last resort, spill op0 to memory, and reload it in a |