Jason,
I also wonder if something like this would make sense:

        * decl.c (build_clobber_this): Use original basetype if they
        match.

Index: decl.c
===================================================================
--- decl.c      (revision 272381)
+++ decl.c      (working copy)
@@ -15210,7 +15210,11 @@ build_clobber_this ()
 
   tree ctype = current_class_type;
   if (!vbases)
-    ctype = CLASSTYPE_AS_BASE (ctype);
+    {
+      if (!tree_int_cst_equal (TYPE_SIZE (ctype),
+                              TYPE_SIZE (CLASSTYPE_AS_BASE (ctype))))
+        ctype = CLASSTYPE_AS_BASE (ctype);
+    }
 
   tree clobber = build_clobber (ctype);
 
Having to LTO stream many classtypes twice just for clobber seems
wasteful

call.c already seem to contain similar logic in build_over_call:
it checks both types for match and if they do it uses class type
for the copy and otherwise it builds array and copies it
(I wonder why I does not just copy CLASSTYPE_AS_BASE instead,
though I see that with the type merging bug this may break with LTO)

Honza

Reply via email to