projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3975f28
)
(fold): Signedness matters for comparisons and right shifts.
author
Richard Kenner
<kenner@gcc.gnu.org>
Mon, 26 Apr 1993 23:12:11 +0000
(19:12 -0400)
committer
Richard Kenner
<kenner@gcc.gnu.org>
Mon, 26 Apr 1993 23:12:11 +0000
(19:12 -0400)
From-SVN: r4243
gcc/fold-const.c
patch
|
blob
|
history
diff --git
a/gcc/fold-const.c
b/gcc/fold-const.c
index 43995c60a0b88b67421581f983225ec509c5c16f..5845489d2567a4b46eaacc27dc89fa45875f84a4 100644
(file)
--- a/
gcc/fold-const.c
+++ b/
gcc/fold-const.c
@@
-3040,8
+3040,17
@@
fold (expr)
if (op == 0)
continue; /* Valid for CALL_EXPR, at least. */
- /* Strip any conversions that don't change the mode. */
- STRIP_NOPS (op);
+ if (kind == '<' || code == RSHIFT_EXPR)
+ {
+ /* Signedness matters here. Perhaps we can refine this
+ later. */
+ STRIP_TYPE_NOPS (op);
+ }
+ else
+ {
+ /* Strip any conversions that don't change the mode. */
+ STRIP_NOPS (op);
+ }
if (TREE_CODE (op) == COMPLEX_CST)
subop = TREE_REALPART (op);