Commit 07150665 by Richard Stallman

(convert_to_complex): Avoid using comptypes.

From-SVN: r3688
parent c3c03e50
...@@ -397,7 +397,8 @@ convert_to_complex (type, expr) ...@@ -397,7 +397,8 @@ convert_to_complex (type, expr)
if (form == COMPLEX_TYPE) if (form == COMPLEX_TYPE)
{ {
if (comptypes (TREE_TYPE (type), TREE_TYPE (TREE_TYPE (expr)))) tree elt_type = TREE_TYPE (TREE_TYPE (expr));
if (TYPE_MAIN_VARIANT (elt_type) == TYPE_MAIN_VARIANT (TREE_TYPE (type)))
return expr; return expr;
else if (TREE_CODE (expr) == COMPLEX_EXPR) else if (TREE_CODE (expr) == COMPLEX_EXPR)
return fold (build (COMPLEX_EXPR, return fold (build (COMPLEX_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