diff options
author | Jan Hubicka <jh@suse.cz> | 2003-01-15 13:43:35 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2003-01-15 12:43:35 +0000 |
commit | b1a6f8db645316b579bf6d42fdfadaea03e44a03 (patch) | |
tree | 6deb389e7c733b4c85650e832ec219085b0ff935 /gcc/convert.c | |
parent | d18c7e595f818f688d073496d64fae9c00b594d6 (diff) | |
download | gcc-b1a6f8db645316b579bf6d42fdfadaea03e44a03.zip gcc-b1a6f8db645316b579bf6d42fdfadaea03e44a03.tar.gz gcc-b1a6f8db645316b579bf6d42fdfadaea03e44a03.tar.bz2 |
re PR rtl-optimization/9258 (ICE in compensate_edge, at reg-stack.c:2589)
PR f/9258
* global.c (struct allocno): Add no_stack_reg.
(global_conflicts): Set no_stack_reg.
(find_reg): Use it.
* convert.c (convert_to_real): Fold - and abs only when profitable.
* fold-const.c (fold): Fold truncates in - and abs.
* gcc.c-torture/compile/20030115-1.c: New test.
* gcc.dg/i386-fpcvt-1.c: New test.
* gcc.dg/i386-fpcvt-2.c: New test.
From-SVN: r61329
Diffstat (limited to 'gcc/convert.c')
-rw-r--r-- | gcc/convert.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/convert.c b/gcc/convert.c index 26fb676..009675f 100644 --- a/gcc/convert.c +++ b/gcc/convert.c @@ -229,9 +229,11 @@ convert_to_real (type, expr) /* convert (float)-x into -(float)x. This is always safe. */ case ABS_EXPR: case NEGATE_EXPR: - return build1 (TREE_CODE (expr), type, - fold (convert_to_real (type, - TREE_OPERAND (expr, 0)))); + if (TYPE_PRECISION (type) < TYPE_PRECISION (TREE_TYPE (expr))) + return build1 (TREE_CODE (expr), type, + fold (convert_to_real (type, + TREE_OPERAND (expr, 0)))); + break; /* convert (outertype)((innertype0)a+(innertype1)b) into ((newtype)a+(newtype)b) where newtype is the widest mode from all of these. */ |