]> gcc.gnu.org Git - gcc.git/blobdiff - gcc/convert.c
Updated to new filenames
[gcc.git] / gcc / convert.c
index 95bac9c3fecc8d0d0f46baae3e7d701c6eb5f725..62bcaf2b3f2b4612dcaab8534b2ee70a516ca16e 100644 (file)
@@ -100,7 +100,7 @@ convert_to_real (type, expr)
   {
     register tree tem = make_node (REAL_CST);
     TREE_TYPE (tem) = type;
-    TREE_REAL_CST (tem) = REAL_VALUE_ATOF ("0.0");
+    TREE_REAL_CST (tem) = REAL_VALUE_ATOF ("0.0", TYPE_MODE (type));
     return tem;
   }
 }
@@ -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 (subtype))
        return expr;
       else if (TREE_CODE (expr) == COMPLEX_EXPR)
        return fold (build (COMPLEX_EXPR,
This page took 0.030358 seconds and 5 git commands to generate.