projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dbfac75
)
(fold): When converting a COND_EXPR to an ABS_EXPR, get the types
author
Richard Kenner
<kenner@gcc.gnu.org>
Tue, 13 Jun 1995 22:32:39 +0000
(18:32 -0400)
committer
Richard Kenner
<kenner@gcc.gnu.org>
Tue, 13 Jun 1995 22:32:39 +0000
(18:32 -0400)
right for ABS_EXPR to work.
From-SVN: r9939
gcc/fold-const.c
patch
|
blob
|
history
diff --git
a/gcc/fold-const.c
b/gcc/fold-const.c
index e7d313657d9520f3df562dfe0bdc7e628770bab4..73ec234e720410cc2f393c09e47bf177acd31542 100644
(file)
--- a/
gcc/fold-const.c
+++ b/
gcc/fold-const.c
@@
-4854,12
+4854,16
@@
fold (expr)
case GE_EXPR:
case GT_EXPR:
return pedantic_non_lvalue
- (fold (build1 (ABS_EXPR, type, arg1)));
+ (convert (type, fold (build1 (ABS_EXPR,
+ TREE_TYPE (arg1), arg1))));
case LE_EXPR:
case LT_EXPR:
return pedantic_non_lvalue
(fold (build1 (NEGATE_EXPR, type,
- fold (build1 (ABS_EXPR, type, arg1)))));
+ convert (type,
+ fold (build1 (ABS_EXPR,
+ TREE_TYPE (arg1),
+ arg1))))));
}
/* If this is A != 0 ? A : 0, this is simply A. For ==, it is