OSDN Git Service

2007-11-05 Paul Brook <paul@codesourcery.com>
[pf3gnuchains/gcc-fork.git] / gcc / tree.c
index 3cfa55d..24e758f 100644 (file)
@@ -5665,7 +5665,7 @@ build_array_type (tree elt_type, tree index_type)
   hashcode = iterative_hash_object (TYPE_HASH (index_type), hashcode);
   t = type_hash_canon (hashcode, t);
 
-  if (!COMPLETE_OR_UNBOUND_ARRAY_TYPE_P (t))
+  if (!COMPLETE_TYPE_P (t))
     layout_type (t);
 
   if (TYPE_CANONICAL (t) == t)
@@ -5949,10 +5949,10 @@ build_offset_type (tree basetype, tree type)
       if (TYPE_STRUCTURAL_EQUALITY_P (basetype)
          || TYPE_STRUCTURAL_EQUALITY_P (type))
        SET_TYPE_STRUCTURAL_EQUALITY (t);
-      else if (TYPE_CANONICAL (basetype) != basetype
+      else if (TYPE_CANONICAL (TYPE_MAIN_VARIANT (basetype)) != basetype
               || TYPE_CANONICAL (type) != type)
        TYPE_CANONICAL (t) 
-         = build_offset_type (TYPE_CANONICAL (basetype), 
+         = build_offset_type (TYPE_CANONICAL (TYPE_MAIN_VARIANT (basetype)),
                               TYPE_CANONICAL (type));
     }