diff options
author | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1992-07-17 04:26:02 +0000 |
---|---|---|
committer | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1992-07-17 04:26:02 +0000 |
commit | dbb5815fe0ad3eb0c2d02002bc8cf6be36755509 (patch) | |
tree | e1675dd77c2091e47acd777b3546e54f1a13d7b0 /gcc/c-convert.c | |
parent | 4b66ffa413eb1c5e00c49dcdef4321098eca7cd2 (diff) | |
download | gcc-dbb5815fe0ad3eb0c2d02002bc8cf6be36755509.tar.gz |
(convert_to_integer): Push truncation inside COND_EXPR.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1609 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-convert.c')
-rw-r--r-- | gcc/c-convert.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/c-convert.c b/gcc/c-convert.c index a4b5a8bd3d5..564992af88f 100644 --- a/gcc/c-convert.c +++ b/gcc/c-convert.c @@ -335,6 +335,13 @@ convert_to_integer (type, expr) convert (typex, arg1), convert (typex, arg2)))); } + else + /* It is sometimes worthwhile + to push the narrowing down through the conditional. */ + return fold (build (COND_EXPR, type, + TREE_OPERAND (expr, 0), + convert (type, TREE_OPERAND (expr, 1)), + convert (type, TREE_OPERAND (expr, 2)))); } } } |