lto.c (uniquify_nodes): Use main variant's BINFO too.
authorMartin Jambor <mjambor@suse.cz>
Thu, 11 Aug 2011 10:09:43 +0000 (12:09 +0200)
committerMartin Jambor <jamborm@gcc.gnu.org>
Thu, 11 Aug 2011 10:09:43 +0000 (12:09 +0200)
2011-08-11  Martin Jambor  <mjambor@suse.cz>

lto/
* lto.c (uniquify_nodes): Use main variant's BINFO too.

From-SVN: r177650

gcc/lto/ChangeLog
gcc/lto/lto.c

index 638e37c1f633db1c5b1f0ff53c22cf94e4434806..48903907e007f68ea30e475815fffce888356c36 100644 (file)
@@ -1,3 +1,7 @@
+2011-08-11  Martin Jambor  <mjambor@suse.cz>
+
+       * lto.c (uniquify_nodes): Use main variant's BINFO too.
+
 2011-08-08   Diego Novillo  <dnovillo@google.com>
 
        * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
index 93ff805b19902ef31c850aa5b52eaa2dff6ed353..9a1aebeb4ce99f9bb36ad37aa22770377a0fc0bc 100644 (file)
@@ -721,6 +721,8 @@ uniquify_nodes (struct data_in *data_in, unsigned from)
            {
              TYPE_NEXT_VARIANT (t) = TYPE_NEXT_VARIANT (mv);
              TYPE_NEXT_VARIANT (mv) = t;
+             if (RECORD_OR_UNION_TYPE_P (t))
+               TYPE_BINFO (t) = TYPE_BINFO (mv);
            }
 
          /* Finally adjust our main variant and fix it up.  */