summaryrefslogtreecommitdiffstats
path: root/gcc/convert.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1993-04-23 10:56:52 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1993-04-23 10:56:52 +0000
commit51c0554c6c48e87d25923be5208c491415d1f273 (patch)
tree5ad2d882cfd3558d595df83fee99314101e583d7 /gcc/convert.c
parentf4ef76773c94db7b32f1b23d587afebd285647dd (diff)
downloadppe42-gcc-51c0554c6c48e87d25923be5208c491415d1f273.tar.gz
ppe42-gcc-51c0554c6c48e87d25923be5208c491415d1f273.zip
(convert_to_integer, convert_to_complex): Avoid using
build_{unary,binary}_op since the calling sequences depend on the front-end. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4196 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/convert.c')
-rw-r--r--gcc/convert.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/gcc/convert.c b/gcc/convert.c
index 62bcaf2b3f2..7261e1baa8e 100644
--- a/gcc/convert.c
+++ b/gcc/convert.c
@@ -269,10 +269,10 @@ convert_to_integer (type, expr)
|| TREE_UNSIGNED (TREE_TYPE (arg1)))
? unsigned_type (typex) : signed_type (typex));
return convert (type,
- build_binary_op (ex_form,
- convert (typex, arg0),
- convert (typex, arg1),
- 0));
+ fold (build (ex_form, typex,
+ convert (typex, arg0),
+ convert (typex, arg1),
+ 0)));
}
}
}
@@ -300,9 +300,9 @@ convert_to_integer (type, expr)
typex = (TREE_UNSIGNED (TREE_TYPE (expr))
? unsigned_type (typex) : signed_type (typex));
return convert (type,
- build_unary_op (ex_form,
- convert (typex, TREE_OPERAND (expr, 0)),
- 1));
+ fold (build1 (ex_form, typex,
+ convert (typex,
+ TREE_OPERAND (expr, 0)))));
}
}
@@ -411,9 +411,13 @@ convert_to_complex (type, expr)
return fold (build (COMPLEX_EXPR,
type,
convert (subtype,
- build_unary_op (REALPART_EXPR, expr, 1)),
+ fold (build1 (REALPART_EXPR,
+ TREE_TYPE (TREE_TYPE (expr)),
+ expr))),
convert (subtype,
- build_unary_op (IMAGPART_EXPR, expr, 1))));
+ fold (build1 (IMAGPART_EXPR,
+ TREE_TYPE (TREE_TYPE (expr)),
+ expr)))));
}
}
OpenPOWER on IntegriCloud