public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* PR 62053
@ 2014-12-15  7:07 Jan Hubicka
  0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2014-12-15  7:07 UTC (permalink / raw)
  To: gcc-patches


Hi,
this patch fixes type inconsistency in between main variant and its variant.
This is caused by build_cplus_array_type first laying down the type and only then
linking it into vairant chain.

Bootstrapped/regtested x86_64-linux, OK?

Honza

	PR tree-optimization/62053
	* tree.c (build_cplus_array_type): Layout type after variants are set.
Index: tree.c
===================================================================
--- tree.c      (revision 216141)
+++ tree.c      (working copy)
@@ -863,12 +863,12 @@ build_cplus_array_type (tree elt_type, t
        {
          t = build_min_array_type (elt_type, index_type);
          set_array_type_canon (t, elt_type, index_type);
-         if (!dependent)
-           layout_type (t);
 
          TYPE_MAIN_VARIANT (t) = m;
          TYPE_NEXT_VARIANT (t) = TYPE_NEXT_VARIANT (m);
          TYPE_NEXT_VARIANT (m) = t;
+         if (!dependent)
+           layout_type (t);
        }
     }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-12-15  7:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-15  7:07 PR 62053 Jan Hubicka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).