Commit 95e78909 by Richard Kenner

(convert_to_integer...

(convert_to_integer, convert_to_complex): Avoid using
build_{unary,binary}_op since the calling sequences depend on the
front-end.

From-SVN: r4196
parent da120c2f
...@@ -269,10 +269,10 @@ convert_to_integer (type, expr) ...@@ -269,10 +269,10 @@ convert_to_integer (type, expr)
|| TREE_UNSIGNED (TREE_TYPE (arg1))) || TREE_UNSIGNED (TREE_TYPE (arg1)))
? unsigned_type (typex) : signed_type (typex)); ? unsigned_type (typex) : signed_type (typex));
return convert (type, return convert (type,
build_binary_op (ex_form, fold (build (ex_form, typex,
convert (typex, arg0), convert (typex, arg0),
convert (typex, arg1), convert (typex, arg1),
0)); 0)));
} }
} }
} }
...@@ -300,9 +300,9 @@ convert_to_integer (type, expr) ...@@ -300,9 +300,9 @@ convert_to_integer (type, expr)
typex = (TREE_UNSIGNED (TREE_TYPE (expr)) typex = (TREE_UNSIGNED (TREE_TYPE (expr))
? unsigned_type (typex) : signed_type (typex)); ? unsigned_type (typex) : signed_type (typex));
return convert (type, return convert (type,
build_unary_op (ex_form, fold (build1 (ex_form, typex,
convert (typex, TREE_OPERAND (expr, 0)), convert (typex,
1)); TREE_OPERAND (expr, 0)))));
} }
} }
...@@ -411,9 +411,13 @@ convert_to_complex (type, expr) ...@@ -411,9 +411,13 @@ convert_to_complex (type, expr)
return fold (build (COMPLEX_EXPR, return fold (build (COMPLEX_EXPR,
type, type,
convert (subtype, convert (subtype,
build_unary_op (REALPART_EXPR, expr, 1)), fold (build1 (REALPART_EXPR,
TREE_TYPE (TREE_TYPE (expr)),
expr))),
convert (subtype, convert (subtype,
build_unary_op (IMAGPART_EXPR, expr, 1)))); fold (build1 (IMAGPART_EXPR,
TREE_TYPE (TREE_TYPE (expr)),
expr)))));
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment