From 07150665c9cee7a80e87a789f7c621c289d1fc78 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Tue, 9 Mar 1993 23:55:57 +0000 Subject: [PATCH] (convert_to_complex): Avoid using comptypes. From-SVN: r3688 --- gcc/convert.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/convert.c b/gcc/convert.c index 95bac9c3fec..5ccce13882b 100644 --- a/gcc/convert.c +++ b/gcc/convert.c @@ -397,7 +397,8 @@ convert_to_complex (type, expr) 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; else if (TREE_CODE (expr) == COMPLEX_EXPR) return fold (build (COMPLEX_EXPR, -- 2.30.2