summaryrefslogtreecommitdiff
path: root/gcc/c-convert.c
diff options
context:
space:
mode:
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>1992-08-14 08:36:14 +0000
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>1992-08-14 08:36:14 +0000
commitc12a63353b31fecda9bdb2ee9791a8571252a622 (patch)
tree1ff769106b0494bfe964a2fbb9ecb0bc3b02ca76 /gcc/c-convert.c
parent1a8138546b4fc4929c2bd842a471b5c812ee88a0 (diff)
downloadgcc-c12a63353b31fecda9bdb2ee9791a8571252a622.tar.gz
(convert): When converting to variant of same type, fold.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1824 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-convert.c')
-rw-r--r--gcc/c-convert.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-convert.c b/gcc/c-convert.c
index 86ce2c5b6a9..afc3ad1dfc9 100644
--- a/gcc/c-convert.c
+++ b/gcc/c-convert.c
@@ -375,7 +375,7 @@ convert (type, expr)
|| TREE_CODE (expr) == ERROR_MARK)
return expr;
if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (TREE_TYPE (expr)))
- return build1 (NOP_EXPR, type, expr);
+ return fold (build1 (NOP_EXPR, type, expr));
if (TREE_CODE (TREE_TYPE (expr)) == ERROR_MARK)
return error_mark_node;
if (TREE_CODE (TREE_TYPE (expr)) == VOID_TYPE)